NEW
Font size
WorksheetsQuiz on Input output & if Stmts
Total questions: 30
Worksheet time: 30mins
What is the output of the code,
printf("%06.2f", 6.66666);
What is the output of the code,
printf("%6.3f", 66666.66666);
What is the output of the code,
printf("%.3s", "hellohere");
What is the output of the statement?
printf("marks \\ total");
What will be the output for the following program?
void main()
{
int a=300,b,c;
if(a>=400)
b=300;
c=200;
printf(“\n%d ,%d”,b,c);
}
What will be the output for the following program?
void main()
{
int a=500,b,c;
if(a>=400)
b=300;
c=200;
printf(“\n%d ,%d”,b,c);
}
What will be the output for the following program?void main()
{
int i=65;
char j=’A’;
if(i==j)
printf(“BETA”);
else
printf(“Bye”);
}
What will be the output for the following program?
void main()
{
int i=5;
if (i = 4)
printf(“The value of i is 5”);
else
printf(“The value of i is not 5”);
}
