
Session 4 : Multiple Choice
Authored by Jirapod Jintasornrom
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of scanf in C?
To print output to the console
To read input from the console
To allocate memory
To perform mathematical operations
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is the correct way to use scanf to read an integer value into variable x?
scanf("%d", x);
scanf("%d", &x);
scanf("d%", x);
scanf("d%", &x);
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of printf in C?
To read input from the console
To print output to the console
To allocate memory
To perform mathematical operations
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How can you read a character input using scanf in C?
scanf("%c", &ch);
scanf("%s", ch);
scanf("%d", ch);
scanf("%c", ch);
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the correct format specifier to read a float value using scanf in C?
%f
%d
%s
%c
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following code if the user enters 12 34?
int main( )
{ int a, b;
scanf("%d %d", &a, &b);
printf("%d %d", a, b);
return 0; }
12 34
34 12
12 12
34 34
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of using the & operator in scanf function in C?
To read input from the console
To print output to the console
To perform mathematical operations
To allocate memory
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
Logika Fuzzy
Quiz
•
University
11 questions
Latex
Quiz
•
University
15 questions
untitled
Quiz
•
11th Grade - University
10 questions
Tree and Planar Graph
Quiz
•
University
13 questions
Processing Quiz
Quiz
•
University
10 questions
Unguided transmission media
Quiz
•
University
15 questions
Sinh hoạt lớp Tuần 7
Quiz
•
1st Grade - University
12 questions
Python Quiz 1.4
Quiz
•
University
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