🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित कोड का आउटपुट क्या होगा?

What will be the output of the following code ?

#include <stdio.h>
void solve() {
int b = 4;
int res = b++ + ++b + ++b;
printf("%d", res);
}
int main() {
solve();
return 0;
}

A)
B)
C)
D)

Explanation:

The code calculates the result of the expression b++ + ++b + ++b, where b starts at 4:

  • b++ uses the value 4, then increments b to 5.
  • ++b increments b to 6 and uses that value.
  • ++b increments b to 7 and uses that value.

The sum is 4 + 6 + 7 = 17.

Output: (C) 17.

Latest Updates