Question 1849 – OOPS
May 6, 2024
Question 6133 – Computer-Networks
May 6, 2024
Question 1849 – OOPS
May 6, 2024
Question 6133 – Computer-Networks
May 6, 2024

Question 4619 – UGC NET CS 2006 June-Paper-2

What is the output of the following program segment ?
main ( )
{
int count, digit=0;
count=1;
while(digit <=9)
{
printf(​”%d /n”” , ++count);
++digit;
}
}

Correct Answer: D

Question 11 Explanation: 
The digit starts with 0 and will run 9 more times. It means, the loop will run 10 runs. The count variable we are given pre increment. So, it increments before assigning values.
It prints the result is
2 /n 3 /n 4 /n 5 /n 6 /n 7 /n 8 /n 9 /n 10 /n 11
A
10
B
9
C
12
D
11
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!