
If else Quiz
Authored by Jayasheela Kallaganiger
Other
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int x = 0;
int main()
{
if(x == x)
printf("hai this is if");
else
printf("hai this is else");
return 0;
}
hai this is if
hai this is else
prints nothing
compiler error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
#define FALSE -1
#define NULL 0
#define TRUE 1
int main()
{ if(NULL)
printf("NULL");
else if(FALSE)
printf("TRUE");
else printf("FALSE");
return 0; }
FALSE
TRUE
NULL
COMPILATION ERROR
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
char str[8] = "if block";
if(str == "if block")
printf("if block executed");
else
printf("else block executed");
return 0;
}
if block executed
else block executed
COMPILATION ERROR
NONE OF THE ABOVE
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
char str[] = "\0";
if(printf("%s",str))
printf("inside if block");
else
printf("inside else block");
return 0;
}
inside else block
inside If block
compilation Error
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
#define NULL 0
int main()
{
if(printf("0") == NULL)
printf("inside if block");
else
printf("inside else block");
return 0;
}
0 inside if block
0 inside else block
0 inside else block
inside if block
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
int i = 1, j = 0 ; if(i-- == j)
printf("i = %d", --i);
else printf("j = %d", ++j);
return 0;
}
i=1
i=-1
j=0
j=1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
int i; if(true)
printf("This will work");
else
printf("This will not work");
return 0;
}
This will work
This will not work
Compilation Error
Runtime Error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
22 questions
My Singing Monsters
Quiz
•
KG - Professional Dev...
18 questions
unidad 1
Quiz
•
University
20 questions
Bias Language Quiz
Quiz
•
11th Grade - University
20 questions
Sustainability
Quiz
•
University
20 questions
Expected Vs. Unexpected Behaviors
Quiz
•
5th Grade - University
20 questions
PENGAJIAN AM SEM 2-( BAHAGIAN B )
Quiz
•
University
19 questions
Gerbang Logika
Quiz
•
10th Grade - University
20 questions
2000-2019 trivia
Quiz
•
6th Grade - Professio...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University