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

what are non standard function in c

1969


What is switch in c?

1160


What is scanf () in c?

1172


What is abstract data structure in c?

1110


Explain the properties of union. What is the size of a union variable

1248


What is an array? What the different types of arrays in c?

1254


How would you rename a function in C?

1091


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1137


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

2044


What is structure data type in c?

1069


If fflush wont work, what can I use to flush input?

1151


What is nested structure?

1097


What are the two types of functions in c?

1057


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1305


Do pointers store the address of value or the actual value of a variable?

1126