Search Header Logo

Introduction to Programming Final Exam - C++ Functions

Authored by Maksat_ Tagai

Computers

Used 2+ times

Introduction to Programming Final Exam - C++ Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

93 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare a function in C++?

function int add()

int add()

def add():

void add[]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to return a value from a function?

give

send

return

output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is called automatically when a program starts?

start()

main()

begin()

init()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does void mean in a function declaration?

The function has no parameters

The function returns nothing

The function is empty

The function has errors

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function named calculate?

calculate[]

call calculate();

calculate();

run calculate;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

10

20

0

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int add(int a, int b) { return a + b; } cout << add(3, 5);

A. 8

B. 35

C. 3 5

D. Error

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?