#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
What are bitwise shift operators in c programming?
Which is the memory area not included in C program? give the reason
Why do we use & in c?
How do you initialize pointer variables?
What are the advantages of c preprocessor?
What is c method?
write a program to find the given number is prime or not
What is "Duff's Device"?
What are the advantages of the functions?
What would be an example of a structure analogous to structure c?
how could explain about job profile
Which are low level languages?
What is a far pointer in c?
what is bit rate & baud rate? plz give wave forms
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file