ExamVeda
Login
Home
Object Oriented Programming Using C Plus Plus
?

The expression c = i++ causes

Answer & Solution
Correct Answer: Option A
The expression c = i++ is an example of the post-increment operator in C++.

In the post-increment operation, the current value of i is assigned to c first.

After this assignment, the value of i is incremented by 1.

Option A: the value of i assigned to c and then i incremented by 1 - This is correct because it accurately describes the post-increment behavior.

Option B: i to be incremented by 1 and then the value of i assigned to c - This is incorrect because it describes the pre-increment operation, not post-increment.

Option C: value of i assigned to c - This is incomplete because it doesn't mention the increment operation.

Option D: i to be incremented by 1 - This is incorrect because it doesn't mention the assignment to c.

Option E: None of the above - This is incorrect because Option A is correct.

Therefore, the correct answer is Option A: the value of i assigned to c and then i incremented by 1.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.