#include<stdio.h>
int main(){
int a[]={1,2,3,5,1};
int *ptr=a+4;
int y=ptr-a;
printf("%d",y);
}
Answer Posted / harsha
as per my knowledge..4
a is base address of array
every array is a pointer
difference between the pointers is count of data elements ,but not difference between address
y=a+4-a
i.e., y=4
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is c language used for?
How can you tell whether a program was compiled using c versus c++?
In C language, a variable name cannot contain?
What is the purpose of sprintf() function?
What does == mean in texting?
What is a pragma?
What is the difference between #include
What is a scope resolution operator in c?
Is void a keyword in c?
Are the expressions * ptr ++ and ++ * ptr same?
Is struct oop?
what is the height of tree if leaf node is at level 3. please explain
What is the collection of communication lines and routers called?
What is meant by errors and debugging?