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
Explain the process of converting a Tree into a Binary Tree.
How do we make a global variable accessible across files? Explain the extern keyword?
What is the use of pointers in C?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
What is ## preprocessor operator in c?
How do I round numbers?
What is the use of the function in c?
Do you know what are bitwise shift operators in c programming?
What extern c means?
What's the right way to use errno?
hi send me sample aptitude papers of cts?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
explain what is a newline escape sequence?
When is a void pointer used?