Search Header Logo

C++ Programming Quiz 2

Authored by seven castueras

Information Technology (IT)

University

Used 4+ times

C++ Programming Quiz 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is a function in C++?

A set of rules that specify which statements are legal.

A collection of statements that accomplish something when executed.

A set of rules, symbols, and special words.

The meaning of an instruction in a programming language.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does syntax refer to in a programming language?

The meaning of the instructions.

The collection of predefined or standard functions.

The rules that specify which statements are legal.

The special symbols used in programming.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following best defines a programming language?

A set of rules, symbols, and special words.

A predefined function in C++.

The collection of executable statements.

A part of the operating system.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What do semantic rules define in C++?

The meaning of an instruction.

The rules that specify which statements are legal.

The collection of functions in a program.

The set of special symbols used in coding.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of comments in a C++ program?

To provide instructions to the compiler

To explain the code for the reader

To speed up program execution

To store program variables

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a correct way to write a multi-line comment in C++?

// This is a multi-line comment

/* This is a multi-line comment */

# This is a multi-line comment #

-- This is a multi-line comment --

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following best describes reserved words (keywords) in C++?

User-defined variable names used in a program.

Special symbols used for arithmetic operations.

Predefined words with specific meanings in the language.

Functions that return values in a program.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?