Loop
MCQ:
1. The following code ‘for(;;)’ represents an infinite loop. It can be terminated by.
A) break
B) exit(0)
C) abort()
D) All of the mentioned
True /False
MCQ:
1. The following code ‘for(;;)’ represents an infinite loop. It can be terminated by.
A) break
B) exit(0)
C) abort()
D) All of the mentioned
True /False
1. The following block of code sums up an input series of grades (terminated by -1).
while( grade != -1 )
total = total + grade;
counter = counter + 1;
printf( "Enter grade, -1 to end: " );
scanf( "%d", &grade );
Question:
1. Why we use do-while loop in C? Also give any properties which you know.
Question:
1. Why we use do-while loop in C? Also give any properties which you know.
No comments:
Post a Comment