main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / xyz
the answer will be 3 b'coz whatever the "num[i] = i++;"
this expression the output will be depend's on "i" and
at last i will be 2 and num[2]=3 which is the answer.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is difference between static and global variable in c?
What is the use of c language in real life?
What is a #include preprocessor?
Why is struct padding needed?
What is the equivalent code of the following statement in WHILE LOOP format?
Why do we use stdio h and conio h?
Explain what is the benefit of using an enum rather than a #define constant?
Is calloc better than malloc?
Is file a keyword in c?
What are header files and what are its uses in C programming?
Explain spaghetti programming?
Explain the array representation of a binary tree in C.
What is floating point constants?
Can you write the function prototype, definition and mention the other requirements.
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?