Post-Test
- What will be the output of the following C code?
- How many times i value is checked in the following C code?
- What is the output of C Program?
- Which keyword can be used for coming out of recursion?
- Choose a right C Statement.
#include <stdio.h>
int main()
{
while ()
printf("In while loop ");
printf("After loop\n");
}
After loop
Compile time error
Infinite loop
#include <stdio.h>
int main()
{
int i = 0;
while (i < 3)
i++;
printf("In while loop\n");
}
3
4
1
#include
int main()
{
int a = 3;
while(a = 5)
{
printf("Hello ");
break;
}
printf("Know Program ");
return 0;
}
Know Program
Hello Know Program
Compiler-time error
return
break
exit
both A and B
Loops or Repetition block executes a group of statements repeatedly.
Loop is usually executed as long as a condition is met
Loops usually take advantage of Loop Counter
All of the above
