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 are keywords c?
What is an endless loop?
write a programming in c to find the sum of all elements in an array through function.
Disadvantages of C language.
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What does c mean in basketball?
why do some people write if(0 == x) instead of if(x == 0)?
What is extern storage class in c?
What is nested structure?
Why c is called object oriented language?
What is the process to generate random numbers in c programming language?
What is identifier in c?
Where static variables are stored in c?
What happens if header file is included twice?
Is main an identifier in c?