Unit 3 I/O functions
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Abhishek Pandey
Used 1+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to input an integer using scanf?
scanf("%s", &num);
scanf("%f", &num);
scanf("%d", &num);
scanf("%c", &num);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct format specifier to print a string in C using printf?
%d
%o
%c
%s
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the scanf function, why is the address-of operator (&) used?
To specify the type of input
To store the input in a variable
To pass the variable's memory address
To terminate the input
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to print a floating-point number with 2 decimal places in C?
printf("%.2f", num);
printf("%2f", num);
printf("%f.2", num);
printf("%2f", num);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following format specifiers can be used to print an integer value in hexadecimal format?
%o
%i
%x
%d
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
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Scratch
Quiz
•
KG - Professional Dev...
9 questions
Structured/Traditional SDM
Quiz
•
University
10 questions
Quiz Komponen Komputer
Quiz
•
1st Grade - University
10 questions
QUIZ GAME
Quiz
•
University
10 questions
LINUX MODULE 03 QUIZ
Quiz
•
University
10 questions
computer Networks
Quiz
•
University
10 questions
Industry 4.0 Unit 1
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
