In the following code, what will be the input format for the integer values?
int a, b;
scanf("%3d %4d", &a, &b);
C Formatted scanf
Quiz
•
Other
•
University
•
Medium
Azrinna Muhamad
Used 5+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following code, what will be the input format for the integer values?
int a, b;
scanf("%3d %4d", &a, &b);
First integer takes 3 digits, second integer takes 4 digits
Both integers take 3 digits
Both integers take 4 digits
No specific digit limit
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct format specifier for reading a floating-point number?
%d
%f
%c
%s
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Integer input
Floating-point input
Character input
String input
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
scanf("%c", character);
scanf("%c", &character);
scanf("%d", &character);
scanf("%s", &character);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The program will read up to 10 characters, including the null terminator.
The program will read up to 9 characters and automatically add a null terminator.
The program will read exactly 9 characters without a null terminator.
The program will only read numbers.
10 questions
Quiz module-1
Quiz
•
University
10 questions
Simple Easy Basic Lua Quiz
Quiz
•
4th Grade - Professio...
10 questions
Introduction to C Programming
Quiz
•
University
10 questions
Pemrograman Dasar
Quiz
•
University
10 questions
ComparisonPractice
Quiz
•
University
10 questions
Pi Day quiz
Quiz
•
University
10 questions
Integers Quiz
Quiz
•
University
10 questions
c set 3
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade