
Chapter 7 Quiz

Quiz
•
Other
•
University
•
Hard
Amrit Selva Ganesh
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct format specifier for printing an unsigned int?
%ld
%d
%i
%u
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which type conversion is safest to prevent data loss?
Converting float to int
Converting char to int
Converting double to float
Converting int to long
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which format specifier is used to print a long int?
%d
%ld
%f
%hd
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an unsigned int?
short int
int
long int
unsigned int
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is integer overflow?
An arithmetic result is too large to represent
A variable is too large to store in memory
An error in scanf
The program crashes
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to prevent overflow when multiplying two ints?
i = (long)(j * j);
i = j * (long)j;
i = (long) j * j;
i = j * j;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which cast will convert an int to double in division?
(double)dividend / divisor
(float)dividend / divisor
(int)dividend / divisor
(long)dividend / divisor
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
6 psychologia poznawcza

Quiz
•
University
22 questions
PRP161 Day 1

Quiz
•
University
23 questions
UTSSKDP2

Quiz
•
University
15 questions
PRF102 - Review 2

Quiz
•
University
17 questions
C Program Day 2

Quiz
•
University
20 questions
Logika & Algoritma Pemrograman

Quiz
•
University
20 questions
Kuis_Pemrograman Dasar

Quiz
•
University
20 questions
Orientation Quiz

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade