int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
Answer Posted / guest
{1,2,3,4}
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What are lookup tables in c?
When should a type cast be used?
Which is the memory area not included in C program? give the reason
What are dangling pointers in c?
How can I discover how many arguments a function was actually called with?
What does c mean in basketball?
What is the explanation for modular programming?
Are bit fields portable?
Explain c preprocessor?
What are pointers?
Why c is faster than c++?
How do we open a binary file in Read/Write mode in C?
Differentiate between calloc and malloc.
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0