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
What is the explanation for modular programming?
explain how do you use macro?
Explain high-order and low-order bytes.
Why is c faster?
What is the total generic pointer type?
How do I copy files?
Why does the call char scanf work?
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
What is the g value paradox?
What is pointer to pointer in c language?
Does * p ++ increment p or what it points to?
Why do we use null pointer?
Why should I prototype a function?
What is static identifier?
What are the different types of pointers used in c language?