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...

int arr[] = {1,2,3,4}
int *ptr=arr;

*(arr+3) = *++ptr + *ptr++;

Final contents of arr[]

Answer Posted / vijaisankar

In this statement
first ptr holds base address of the array(4000),
then as per precedence operators ptr gets post incremented
(4002)though it points the value 1(4000)(ptr is post
incremented) and then ptr gets preincrement so (4004) the
value in that one is 3 then 3+1=4.
*(arr+3)=3;

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the explanation for modular programming?

1160


explain how do you use macro?

1106


Explain high-order and low-order bytes.

1057


Why is c faster?

1030


What is the total generic pointer type?

1120


How do I copy files?

1009


Why does the call char scanf work?

1169


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1162


What is the g value paradox?

1118


What is pointer to pointer in c language?

1072


Does * p ++ increment p or what it points to?

1074


Why do we use null pointer?

1011


Why should I prototype a function?

1134


What is static identifier?

1180


What are the different types of pointers used in c language?

1009