Search Header Logo

Quiz on Functions#1

Authored by Merin M

Computers

University

Used 1+ times

Quiz on Functions#1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a library function but can be a user defined function?

cos()
sqrt()
pow()
add()

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

We use fucntions to reuse block of code. How many times, can you call a function?

only one time
2 times
Maximum of 10 times
Any number of times

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a correct format for declaration of function?

return-type function-name(argument type);
return-type function-name(argument type){}
return-type (argument type)function-name;
argument type function-name(return-type);

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many values can a C Function return at a time?

Only one value
maximum 2 values
maximum 3 values
maximum 8 values

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is one of the advantages of using Functions in the program?

returning
re-usability
recording
recovery

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following library function can be used to evaluate a*a*a?

cube(a)
power(a,3)
Mul(a,3)
pow(a,3)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

void foo();

void main()

{

void f();

f();

}

void foo()

{

printf("2 ");

}

void f()

{

printf("1 ");

foo();

}

Compile Time Error
1 2
2 1
Infinite Loop

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?