Login
Remember
Register
Ask a Question
What is the output of the following code?
0
votes
asked
May 23, 2024
in
C Plus Plus
by
rajeshsharma
What is the output of the following code?
int main() {
int x = 5;
printf(ā%dā, x++);
return 0;
}
A) 5
B) 6
C) 4
D) None of the above
cout
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 23, 2024
by
rajeshsharma
Answer: A
Explanation: The value of x is first printed using the printf function and then incremented using the ++ operator. Therefore, the output is 5.
...