
C Programming Control Flow Statements
Flashcard
•
Computers
•
University
•
Practice Problem
•
Hard
Kayal Prag
FREE Resource
Student preview

8 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the purpose of 'if statements' in C?
Back
'If statements' control the program flow based on a condition; they execute a code block when the expression evaluates to true.
2.
FLASHCARD QUESTION
Front
What is the syntax of an 'if statement' in C?
Back
if(condition) { // Statements to execute if condition is true }
3.
FLASHCARD QUESTION
Front
What will be the output of the following code? int i = 10; if (i > 15) { printf("10 is greater than 15"); } printf("I am Not");
Back
I am Not
4.
FLASHCARD QUESTION
Front
What is the difference between 'if statements' and 'if...else statements'?
Back
'If...else statements' execute a code block if the expression is true; otherwise, they execute the else statement code block.
5.
FLASHCARD QUESTION
Front
What is the syntax of 'if...else' in C?
Back
if (condition) { // Executes this block if condition is true } else { // Executes this block if condition is false }
6.
FLASHCARD QUESTION
Front
What will be the output of the following code? int i = 20; if (i < 20) { printf("i is smaller than 20"); } else printf("The number may be equal to 20");
Back
The number may be equal to 20
7.
FLASHCARD QUESTION
Front
What are 'if-else-if statements' used for?
Back
'If-else-if statements' are used when the user has to decide among multiple options.
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
10 questions
Accidents and Their Effects
Flashcard
•
University
10 questions
Evolve 2 Unit - 8 Flashcard - 1
Flashcard
•
University
10 questions
Water Footprint Flashcard
Flashcard
•
12th Grade
8 questions
Career Move into the Garment Industry
Flashcard
•
KG
4 questions
If conditional statement
Flashcard
•
University
6 questions
Intellectual High Potential
Flashcard
•
Professional Development
8 questions
Compare and Contrast Flashcard
Flashcard
•
11th Grade
3 questions
Unit 1.3 Opportunity cost & 1.4 PPC
Flashcard
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade