#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 is a pointer value and address in c?
Why is c called a structured programming language?
a program that can input number of records and can view it again the record
What is a shell structure examples?
How can you increase the size of a dynamically allocated array?
What is data types?
What does it mean when a pointer is used in an if statement?
How old is c programming language?
What is a null pointer in c?
What is wild pointer in c with example?
Can you tell me how to check whether a linked list is circular?
What are the advantages of using Unions?
What is stack in c?
What is a list in c?
difference between native and cross compilers