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

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

What will be the output of the following code?

void main()
{
int x = 5*6/2 +8;
printf("%d",x);
return 0;
}

A
20
B
21
C
23
D
19
Explanation

Let's break down the code step by step:

Code:

void main()
{
    int x = 5*6/2 + 8;
    printf("%d", x);
    return 0;
}

Step-by-step calculation:

  1. 5 * 6 gives 30.
  2. 30 / 2 gives 15.
  3. 15 + 8 gives 23.

So, the value of x will be 23.

Thus, the output of the program will be:

(C) 23.

Correct Answer: C) 23

Latest Updates