CPP Midterm

CPP Midterm

University

35 Qs

quiz-placeholder

Similar activities

Java Control Flow and Collections

Java Control Flow and Collections

11th Grade - Professional Development

39 Qs

PL/SQL Advanced knowledge

PL/SQL Advanced knowledge

University

37 Qs

CS Basics

CS Basics

4th Grade - University

35 Qs

Python Finals Quiz

Python Finals Quiz

University

37 Qs

C++ Basics

C++ Basics

University

40 Qs

UNIT - III TEST

UNIT - III TEST

University

30 Qs

JS Lesson 31-72

JS Lesson 31-72

12th Grade - University

40 Qs

CSS QUIZ DAW EWAN

CSS QUIZ DAW EWAN

University

31 Qs

CPP Midterm

CPP Midterm

Assessment

Quiz

Computers

University

Hard

Created by

John Oli

Used 4+ times

FREE Resource

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Media Image

What will be the output of the following code?

A

B

C

None of the above

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Media Image

What will be the output of the following code?

Compilation error

A

B

Runtime error

3.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Media Image

What is the value of x after the following code is executed?

0

1

2

3

4.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is not a valid C++ comparison operator?

==

=

>=

!=

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the correct way to comment out a single line in C++?

// This is a comment

/* This is a comment */

' This is a comment

# This is a comment

6.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Media Image

Given the following code, what is the value of result?


3

13

8

40

7.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following statements is true about the --- if-else --- statement in C++?

An if-else statement can have multiple else blocks.

An if-else statement can only have one if block.

The else block is optional.

if-else statements can only be used for numerical comparisons.

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?