C++ Functions and Arrays Quiz

C++ Functions and Arrays Quiz

University

34 Qs

quiz-placeholder

Similar activities

C-Programming

C-Programming

University

30 Qs

CODEZILLA 2022

CODEZILLA 2022

University

30 Qs

Kuis 2

Kuis 2

University

35 Qs

Java-2

Java-2

University

30 Qs

Q3 CH3

Q3 CH3

University

30 Qs

Code Twisters Round One Batch -1

Code Twisters Round One Batch -1

University

30 Qs

Decision and Case Control Statements in C

Decision and Case Control Statements in C

University

35 Qs

CodeChef (Secret Snippet)

CodeChef (Secret Snippet)

University

35 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?