Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#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


Please Help Members By Posting Answers For Below Questions

How can I do peek and poke in c?

1039


How can I open a file so that other programs can update it at the same time?

1134


What are the application of void data type in c?

1138


Explain what are preprocessor directives?

1017


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

5144


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1031


What is the size of enum in bytes?

1039


Explain why C language is procedural?

1168


why do some people write if(0 == x) instead of if(x == 0)?

1014


What are the two forms of #include directive?

1101


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

1386


Explain do array subscripts always start with zero?

1177


Explain high-order and low-order bytes.

1052


Explain enumerated types.

980


Do you know the purpose of 'register' keyword?

975