Search Header Logo

Unit 12: Types of function

Authored by Abhishek Pandey

Computers

University

Used 2+ times

Unit 12: Types of function
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for declaring a function in C?

return_type function_name();

function_name return_type();

function_name();

return_type function_name;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of a function that does not return any value?

float

void

char

int

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function prototype?

Declaration of a function

Definition of a function

Execution of a function

function call possibly

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to call a function named sum?

sum();

sum;

call sum;

sum[];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an advantage of "call by address"?

Faster execution

Ability to modify the actual arguments

No need for pointers

Less memory usage

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In call by value, changes made inside the function definition

Do not affect the original variables

Modify the memory address of variables

Are reflected in the caller function

Always result in compilation errors

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?

Discover more resources for Computers