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
will u please send me the placement papers to my mail???????????????????
Explain the advantages and disadvantages of macros.
Why we use void main in c?
What is cohesion in c?
Explain what are header files and explain what are its uses in c programming?
What are the different types of errors?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What are operators in c?
What is a stream in c programming?
What is a char c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What are the differences between Structures and Arrays?
What is the significance of c program algorithms?
Explain the process of converting a Tree into a Binary Tree.