CSC126_Quiz7: Chapter 5.1

CSC126_Quiz7: Chapter 5.1

University

15 Qs

quiz-placeholder

Similar activities

Web Technologies(A6602)

Web Technologies(A6602)

University

20 Qs

CSNP 04103 C++ Midterm preparation

CSNP 04103 C++ Midterm preparation

University - Professional Development

11 Qs

Understanding Python Functions

Understanding Python Functions

University

20 Qs

C++ Functions

C++ Functions

University

10 Qs

BCA Revision u11 to 14

BCA Revision u11 to 14

University

12 Qs

Data Visualization using Tableau - Quiz 1

Data Visualization using Tableau - Quiz 1

University

16 Qs

Computational Thinking in Python[Quiz 4]

Computational Thinking in Python[Quiz 4]

University

15 Qs

Quiz 1

Quiz 1

University

15 Qs

CSC126_Quiz7: Chapter 5.1

CSC126_Quiz7: Chapter 5.1

Assessment

Quiz

Computers

University

Hard

Created by

TS ZAKARIA

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in programming?

A type of variable

A block of code designed to perform a specific task

A data structure

A library of predefined functions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a characteristic of user-defined functions?

They are predefined in libraries

They are written by the programmer

They cannot return values

They are always void functions

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a function prototype?

To call the function

To execute the function immediately

To declare the function's name, return type, and parameters

To define the body of the function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'setprecision' function do?

Copies one string to another

Controls the number of digits displayed for floating-point numbers

Compares two strings character by character

Sets the width of the output field

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C++, what is the difference between actual and formal parameters?

Actual parameters are passed during function definition, formal parameters are used in function calls

Actual parameters are always integers, formal parameters can be any type

Formal parameters are passed during function definition, actual parameters are used in function calls

Both are the same

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of a void function?

It can return multiple values

It returns a string

It does not return a value

It returns a value

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which header file is used for mathematical functions in C++?

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?