Question: 11
How many times Hello is printed?
int main()
{
while(1);
{
printf(“Hello”);
}
return 0;
}
A. 1 time
B. 0 time
C. Compilation/Runtime Error
D. Blank Screen in Infinite Loop
Question: 12
What is printed on console?
int main()
{
int a = 0;
while(a)
{
printf(“Hello”);
}
return 0;
}
A. Hello is printed Infinite times
B. Hello is printed 1 time only
C. Nothing is printed
D. Program gives error
Question: 13
How many times Hello is printed on console?
int main()
{
int a = 0;
while(a==0)
{
printf(“Hello”);
}
return 0;
}
A. 0 times
B. Infinite times (Untill Stack is overflow)
C. 1 time
D. Nothing is printed
Question: 14
How many times Hello is printed on console?
int main()
{
int a = 0;
while(a++)
{
printf(“Hello”);
}
return 0;
}
A. Nothing is printed on screen
B. 0 time
C. 1 time
D. Infinite times (Untill Stack overflow)
Question: 15
How many times Hello is printed?
int main()
{
int a = 0;
while(a++);
{
printf(“Hello”);
}
return 0;
}
A. 0 time
B. 1 time
C. Compilation Error
D. Infinite times