Topic 1 C++ Programming

Topic 1 C++ Programming

12th Grade

12 Qs

quiz-placeholder

Similar activities

Coding Fundamentals in C

Coding Fundamentals in C

6th Grade - Professional Development

12 Qs

Post Test C++

Post Test C++

9th - 12th Grade

10 Qs

XI Assessemnt 2

XI Assessemnt 2

11th Grade - University

10 Qs

C programming

C programming

10th - 12th Grade

16 Qs

Java Programming Basics

Java Programming Basics

12th Grade

17 Qs

Python basics

Python basics

9th - 12th Grade

16 Qs

C-Programming Basics

C-Programming Basics

12th Grade

16 Qs

c fundamentals

c fundamentals

12th Grade

11 Qs

Topic 1 C++ Programming

Topic 1 C++ Programming

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Nadzatul Rahman

Used 3+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the #include <iostream> directive in a C++ program?

To include standard input/output stream library

To include mathematical functions

To include file handling functions

To include string manipulation functions

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a valid C++ identifier?

123identifier

_identifier

identifier with spaces

identifier-with-hyphens

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which data type is used to store integer values in C++?

int

float

char

bool

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output of the following C++ code snippet?

Value of num: 10

Value of num: 11

10

Error: 'num' was not declared in this scope

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which C++ data type is used to store single characters?

int

float

char

double

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output of the following C++ code snippet?

Value of y: 5.25

5.25

Value of y: 5

5

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the return 0; statement in the main() function of a C++ program?

It indicates that the program executed successfully.

It returns the value 0 to the operating system.

It terminates the program.

All of the above.

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?

Discover more resources for Computers