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 operator precedence?
What does typedef struct mean?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Why dont c comments nest?
What are the types of data structures in c?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
How to implement a packet in C
Define Spanning-Tree Protocol (STP)
how many errors in c explain deply
How can I sort a linked list?
How can I do peek and poke in c?
What are the string functions? List some string functions available in c.
how should functions be apportioned among source files?
What is void main () in c?
What is table lookup in c?