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
Is there anything like an ifdef for typedefs?
Where are local variables stored in c?
what is reason of your company position's in india no. 1.
Do you know the difference between malloc() and calloc() function?
What is equivalent to ++i+++j?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What is a struct c#?
What are two dimensional arrays alternatively called as?
Can you tell me how to check whether a linked list is circular?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Can you assign a different address to an array tag?
What is the use of typedef in c?
Why is structure important for a child?
What is a ternary operator in c?