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
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
Are comments included during the compilation stage and placed in the EXE file as well?
what are # pragma staments?
Are pointers integer?
Why isnt any of this standardized in c?
Is struct oop?
If null and 0 are equivalent as null pointer constants, which should I use?
What are different types of pointers?
How can I read/write structures from/to data files?
How do I use void main?
What is wrong with this statement? Myname = 'robin';
Difference between exit() and _exit() function?
What is the difference between procedural and declarative language?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
How many types of arrays are there in c?