πŸ“Š C Programming
Q. What will be the output of the following code snippet?
Code:
#include <stdio.h>
void solve() {
    int a = 3;
    int res = a++ + ++a + a++ + ++a;
    printf("%d", res);
}
int main() {
	solve();
	return 0;
}
  • (A) 12
  • (B) 24
  • (C) 20
  • (D) 18
πŸ’¬ Discuss
βœ… Correct Answer: (C) 20

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
211
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Manisha Agrawal
Publisher
πŸ“ˆ
92%
Success Rate