all the given answers and click over the correct answer.
If you are
not sure about the answer then you can check the answer
using Show Answer button. You can use Next Quiz button to check new
set of questions in the quiz.
Q 1 - What is the output of the following code snippet?
#include<stdio.h>
main()
{
int x = 5;
if(x=5)
{
if(x=5) break;
printf("Hello");
}
printf("Hi");
}
A - Compile error
B - Hi
C - HelloHi
D - Compiler warning
Show Answer
Q 2 - What is the output of the following program?
#include<stdio.h>
main()
{
int i = 1;
while(i++<=5);
printf("%d ",i++);
}
A-4
B-6
C-26
D-24
Show Answer
Q 3 - What is the output of the following program?
#include<stdio.h>
main()
{
int a[] = {2,1};
printf("%d", *a);
}
A-0
B-1
C-2
D - Compile error.
Show Answer
Q 4 - What is the output of the following program?
#include<stdio.h>