wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Types in C++

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Arthur, Sophie, and Freya are having a debate about primitive data types in C++. Which of the following is a primitive data type in C++ that they should consider?

a)

boolean

b)

int

c)

string

d)

float

2.

Lily, Elsie, and Noah are having a debate about which data type is used to store whole numbers in C++. Can you help them settle the debate?

a)

float

b)

boolean

c)

int

d)

string

3.

Harry, Anaya, and Chloe are having a debate about which data type is used to store decimal numbers in C++. Can you help them settle the debate?

a)

int

b)

char

c)

bool

d)

float or double

4.

Ishaan, William, and Emily are playing a game where they need to guess the data type used to store single characters in C++. Can you help them?

a)

char

b)

string

c)

float

d)

int

5.

Scarlett, Evie, and Anaya are playing a game of C++ trivia. They come across a question: Which data type is used to store true or false values in C++?

a)

int

b)

float

c)

bool

d)

char

6.

Aarav, Anaya, and Rohan are having a debate about the size of the 'int' data type in C++. Can you help them settle the argument?

a)

4 bytes

b)

8 bytes

c)

16 bytes

d)

2 bytes

7.

Rosie, Rohan, and Matilda are having a debate about the size of the 'float' data type in C++. Can you help them settle the argument?

a)

1

b)

2

c)

8

d)

4

8.

Eesha, Priya, and Aarav are having a debate about the size of the 'char' data type in C++. Can you help them settle the argument?

a)

1 byte

b)

8 bytes

c)

4 bytes

d)

2 bytes

9.

Aarav, Max, and Neha are having a friendly debate about C++. Aarav says that the 'bool' data type in C++ is 1 byte in size. Max thinks it's 2 bytes, while Neha believes it's 4 bytes. And there's a rumor going around that it's actually 8 bytes! Who do you think is correct?

a)

Aarav (1 byte)

b)

Max (2 bytes)

c)

Neha (4 bytes)

d)

Rumor (8 bytes)

10.

Leo, Benjamin, and Grace are having a friendly debate about C++. They can't agree on which data type is used to store a sequence of characters. Can you help them settle this?

a)

char

b)

int

c)

float

d)

string