int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
Answer Posted / jai
{1,2,3,4}
++ has higher precedence over *, assigment will resolve to
*(arr+3) = *(++ptr) + *(ptr++);
*(arr+3) = 2 + 2;
=> Though ptr is pointing to address of 3rd element after
post increment.
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
When c language was developed?
Where are the auto variables stored?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
i want to know the procedure of qualcomm for getting a job through offcampus
Write the test cases for checking a variable having value in range -10.0 to +10.0?
How can I read data from data files with particular formats?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
List the difference between a "copy constructor" and a "assignment operator"?
Describe dynamic data structure in c programming language?
What is action and transformation in spark?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
Explain what is the benefit of using enum to declare a constant?
What is n in c?
What is function prototype in c with example?