main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / tk
Answer is :: 3
Explanation::
main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++; // Here i = 1, so num[1] = 1; and num =
{1,1,3,4}
// After the execution of this statement the value of i
will be 2 (as i++)
printf("%d", num[i]); // num[2] = 3 so answer is 3
}
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is action and transformation in spark?
Explain Function Pointer?
Explain what is the concatenation operator?
What is the difference between the = symbol and == symbol?
how do you programme Carrier Sense Multiple Access
What is FIFO?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Why c is called procedure oriented language?
Is multithreading possible in c?
How can you return multiple values from a function?
What language is windows 1.0 written?
What is wrong in this statement?
What is clrscr in c?
What 'lex' does?
What does 4d mean in c?