Open In App

NTA | UGC NET 2019 December | Question 3

What is the output of following C program?

# include<stdio.h>



main( ) {

int i, j, x = 0;



for (i = 0; i < 5; ++i)

for (j = 0; j < i; ++j)

{

x + = (i + j – 1);

break;

}

printf (“%d”,x) ;

}

(A)

6

(B)

5

(C)

4

(D)

3

Answer: (A)
Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :
Uncategorized