swe111 quiz 1

swe111 quiz 1

University

10 Qs

quiz-placeholder

Similar activities

Unit 12 - Big data

Unit 12 - Big data

12th Grade - University

10 Qs

Python - Functions

Python - Functions

University

10 Qs

Java Method Overloading

Java Method Overloading

University

6 Qs

Function Revision2

Function Revision2

University

10 Qs

Computer Organization and Architecture

Computer Organization and Architecture

University

9 Qs

BINARY BRAINS

BINARY BRAINS

University

10 Qs

JavaScript Fundamentals

JavaScript Fundamentals

9th Grade - Professional Development

10 Qs

H466 - Global and Local Variables

H466 - Global and Local Variables

12th Grade - University

10 Qs

swe111 quiz 1

swe111 quiz 1

Assessment

Quiz

Computers

University

Medium

Created by

Riham KamalAbdelAziz

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is function overloading?

Define same functions with the same name but different return types.

Define multiple functions with the same name but different parameter lists.

Using too many functions in a program.

Calling the same function multiple times in main().

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about function overloading is FALSE?

Functions can be overloaded based on the number of parameters.

Functions can be overloaded based on the return type alone

Functions can be overloaded based on different parameter types.

Functions with same names can be overloaded.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what is the output ?

Inside function: 15 After function call: 15

Inside function: 15 After function call: 10

Compilation error

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when we pass an argument by value?

The function gets a copy of the variable.

The original variable is modified.

The function directly accesses the memory of the original variable.

The compiler generates an error.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of this overloaded function call?

7
6.0

7
6

Compilation error

Undefined behavior

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the advantage of function overloading?

Reduces the need for multiple function names.

Increases code complexity.

Makes it harder to understand the code.

Prevents the use of different data types in a function.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what is the error ?

cout statement needs to be written after the return statement

Cannot return a value since the function is of type void

Need to pass both x and y parameters by reference

Cannot multiply x with y and return the answer in the same line

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?