0% found this document useful (0 votes)
334 views2 pages

Q 1 - What Is The Output of The Following Code Snippet?

The document contains 4 multiple choice questions about C programming code snippets. Each question includes 4 possible answer choices and a "Show Answer" button to check the correct response. A user can navigate between questions using "Next Quiz" to view additional sets of questions in the quiz.

Uploaded by

Omairakhtar Pk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
334 views2 pages

Q 1 - What Is The Output of The Following Code Snippet?

The document contains 4 multiple choice questions about C programming code snippets. Each question includes 4 possible answer choices and a "Show Answer" button to check the correct response. A user can navigate between questions using "Next Quiz" to view additional sets of questions in the quiz.

Uploaded by

Omairakhtar Pk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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>

You might also like