C++ Basics

C++ Basics

University

20 Qs

quiz-placeholder

Similar activities

PERULANGAN WHILE DO

PERULANGAN WHILE DO

University

20 Qs

Decision In C

Decision In C

University

16 Qs

Java Programming I 3

Java Programming I 3

University

17 Qs

C++ Switch  and If Else Statements

C++ Switch and If Else Statements

University

15 Qs

PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS

PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS

University

15 Qs

Wiki Practice Test

Wiki Practice Test

University

16 Qs

C++ Switch Statement

C++ Switch Statement

University

15 Qs

PF_Q1_IT1104

PF_Q1_IT1104

University

20 Qs

C++ Basics

C++ Basics

Assessment

Quiz

Computers

University

Medium

Created by

Long Trần

Used 4+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary function of a program in C++?

To perform network operations

To manipulate values and create new ones

To store only integers

To manage hardware devices

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an expression in C++?

A sequence of operators and operands that produces a value

A set of commands to display output

A loop that executes indefinitely

A keyword to define a variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a unary expression?

`x * y`

`x + y`

`-x`

`x % y`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression `30 % 5`?

5

30

0

1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to find the remainder of a division in C++?

/

%

*

+

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression `7 / 2` in C++ when both operands are integers?

3.5

4

3

2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of implicit type conversion?

Manually converting a float to an int

A float being automatically converted to an int in an expression

Using a cast operator to change a data type

Explicitly defining the type of a variable

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?