C++ Functions and Arrays Quiz

C++ Functions and Arrays Quiz

University

34 Qs

quiz-placeholder

Similar activities

CS 131 - Set 2

CS 131 - Set 2

University

34 Qs

QUIZ PEMROGRAMAN 1 REG. PAGI

QUIZ PEMROGRAMAN 1 REG. PAGI

University

35 Qs

MID SEM COMPUTING SEM 2

MID SEM COMPUTING SEM 2

University

30 Qs

Technical Quiz WCC

Technical Quiz WCC

University

30 Qs

Structures and Pointers in C

Structures and Pointers in C

University

35 Qs

Think Tank Tuesday

Think Tank Tuesday

University

30 Qs

Java Control Flow and Collections

Java Control Flow and Collections

11th Grade - Professional Development

39 Qs

Coding Trivia

Coding Trivia

University

30 Qs

C++ Functions and Arrays Quiz

C++ Functions and Arrays Quiz

Assessment

Quiz

Computers

University

Medium

Created by

ZPPSU VLs

Used 7+ times

FREE Resource

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use functions in a program?

To organize code and reduce redundancy

To make the program longer

To increase memory usage

To make debugging harder

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of function is provided by the C++ library?

Custom

Built-in

Manual

User-defined

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct term for data sent to a function?

Conditions

Arguments

Parameters

Pointers

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the return type in a function indicate?

Code inside the function

Number of arguments

How many times the function runs

Type of value the function return

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct order of a function definition?

returnType, functionName, parameters

functionName, returnType, parameters

returnType, parameters, functionName

parameters, returnType, functionName

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a built-in C++ function?

sqrt()

calculateTotal()

add_numbers()

runProgram()

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of this code?

int square(int x) { return x * x; }

int main() { cout << square(3); }

6

3

9

Error

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?