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
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What is #define?
Do you know what are the properties of union in c?
When should structures be passed by values or by references?
What is wrong in this statement? scanf(ā%dā,whatnumber);
What is a structural principle?
How many keywords (reserve words) are in c?
How can you return multiple values from a function?
What are the 4 types of unions?
When should I declare a function?
What is string function in c?
using for loop sum 2 number of any 4 digit number in c language
What is enumerated data type in c?
What is class and object in c?
What language is lisp written in?