Chapter 7 Quiz

Chapter 7 Quiz

University

20 Qs

quiz-placeholder

Similar activities

Test your knowledge 03

Test your knowledge 03

12th Grade - University

15 Qs

CodeQuest Round 2

CodeQuest Round 2

University

15 Qs

C Quiz

C Quiz

University

15 Qs

PRF102 - Review 2

PRF102 - Review 2

University

15 Qs

Mindzone Season-3

Mindzone Season-3

University

15 Qs

Quiz

Quiz

University

15 Qs

Quiz on Array

Quiz on Array

University

20 Qs

PRP161 Day 1

PRP161 Day 1

University

22 Qs

Chapter 7 Quiz

Chapter 7 Quiz

Assessment

Quiz

Other

University

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?