
Printf Scanf Quiz

Quiz
•
Computers
•
Professional Development
•
Hard
Zohaib Hasan
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be printed?
printf("%10.1f", 4.6785);
4.7 after 7 spaces
4.6 after 8 spaces
4.6785 after 7 spaces
4.6785 after 10 spaces
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be printed?
printf("%10d", 45);
45 after 10 spaces
45 after 8 spaces
45 with no spaces before
45 after 7 spaces
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be printed?
printf("%0*d %0*d", 5,6,5,8);
00005 00008
5 8
5 6 5 8
Compilation Error
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be printed?
printf("%d %d", '0', '1');
0 1
48 49
'0' '1'
Compilation Error
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be printed if input is 4 456?
int a,b;
scanf("%d %2d", &a, &b);
printf("%d %d", a , b);
4 456
4 45
4 4
4 6
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be printed? (underscore in option shows spaces)
printf("%-7ddvr%5d",264,32);
264____dvr___32
264__dvr_32
264_______dvr_____32
264_______32
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output if the value of 'a' is entered 0x23?
int a;
scanf("%i", &a);
printf("%x", a);
0x23
23
0
Compilation Error
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
หน่วยที่ การโปรแกรมคอมพิวเตอร์เชิงโครงสร้าง 1/66

Quiz
•
Professional Development
10 questions
Day 2 C Programming quiz

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
13 questions
MindSpace Computers C Quiz-1 2025

Quiz
•
Professional Development
15 questions
Lenguaje C

Quiz
•
Professional Development
15 questions
C Language Quiz-1

Quiz
•
University - Professi...
15 questions
C CODE MASTER

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
11 questions
complex sentences

Quiz
•
Professional Development
8 questions
Ötzi the Iceman: A 5,000-Year-Old True Crime Murder Mystery | Full Documentary | NOVA | PBS

Interactive video
•
Professional Development
1 questions
Savings Questionnaire

Quiz
•
6th Grade - Professio...
6 questions
Basics of Budgeting 7

Quiz
•
6th Grade - Professio...
20 questions
Movies

Quiz
•
Professional Development