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

In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1265


Are comments included during the compilation stage and placed in the EXE file as well?

1131


what are # pragma staments?

2083


Are pointers integer?

1080


Why isnt any of this standardized in c?

1132


Is struct oop?

1064


If null and 0 are equivalent as null pointer constants, which should I use?

1316


What are different types of pointers?

1109


How can I read/write structures from/to data files?

1018


How do I use void main?

1149


What is wrong with this statement? Myname = 'robin';

1396


Difference between exit() and _exit() function?

1179


What is the difference between procedural and declarative language?

1190


5 Write an Algorithm to find the maximum and minimum items in a set of ā€˜n’ element.

2164


How many types of arrays are there in c?

1084