QUIZ ON : PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON - FUNCTIONS

FUNCTIONS

00:00:00

exit() function is defined in stdio.h header file.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer B

Explanation :

exit() function is defined in stdio.h header file.

Question No# : 01 out of 20



Names of functions in two different files linked together must be unique.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

Names of functions in two different files linked together must be unique.

Question No# : 02 out of 20

In C functions the actual expressions / parameters are passed on to formal parameters using the method of call by value result

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

In C functions the actual expressions / parameters are passed on to formal parameters using the method of call by value result

Question No# : 03 out of 20

Function putchar() displays

Option A. one word at a time on the screen
Option B. one character at a time
Option C. result on the screen
Option D. None of the above
True Answer B

Explanation :

Function putchar() displays

Question No# : 04 out of 20

Functions can return a floating point number.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

Functions can return a floating point number.

Question No# : 05 out of 20

A function name can be passed as an argument to another function.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

A function name can be passed as an argument to another function.

Question No# : 06 out of 20

Which keyword can be used for coming out of recursion?

Option A. break
Option B. return
Option C. exit
Option D. Both break and return
True Answer B

Explanation :

Which keyword can be used for coming out of recursion?

Question No# : 07 out of 20



The address of the variable is passed to a function in call by reference.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

The address of the variable is passed to a function in call by reference.

Question No# : 08 out of 20

The data structure used to implement recursive function calls

Option A. Array
Option B. Linked list
Option C. Binary tree
Option D. Stack
True Answer D

Explanation :
The compiler uses the data type stack for implementing normal as well as recursive function calls.

The data structure used to implement recursive function calls

Question No# : 09 out of 20



Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3();

Option A. f1, f2, f3
Option B. f3, f2, f1
Option C. Order may vary from compiler to compiler
Option D. None of the above
True Answer C

Explanation :

Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3();

Question No# : 10 out of 20

Actual parameters are used at the time of function calling.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

Actual parameters are used at the time of function calling.

Question No# : 11 out of 20

In C all functions except main() can be called recursively.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :
Any function including main() can be called recursively.

In C all functions except main() can be called recursively.

Question No# : 12 out of 20

Array is passed to a function using call by value method.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer B

Explanation :

Array is passed to a function using call by value method.

Question No# : 13 out of 20

In ‘C’, parameters to a function can be passed by value but not by reference.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer B

Explanation :

In ‘C’, parameters to a function can be passed by value but not by reference.

Question No# : 14 out of 20

Changes made to an array inside a function are automatically reflected in calling program.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

Changes made to an array inside a function are automatically reflected in calling program.

Question No# : 15 out of 20

void (*ptr)() is a pointer to a function which receives nothing and returns nothing.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

void (*ptr)() is a pointer to a function which receives nothing and returns nothing.

Question No# : 16 out of 20

The name of all functions end with a

Option A. pair of parenthesis
Option B. semicolon
Option C. braces
Option D. colon
True Answer A

Explanation :

The name of all functions end with a

Question No# : 17 out of 20

In C, if you pass an array as an argument to a function, what actually gets passed?

Option A. Value of elements in array
Option B. First element of the array
Option C. Base address of the array
Option D. Address of the last element of array
True Answer C

Explanation :
The statement 'C' is correct. When we pass an array as a funtion argument, the base address of the array will be passed.

In C, if you pass an array as an argument to a function, what actually gets passed?

Question No# : 18 out of 20



Maximum number of arguments that a function can take is 12

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer B

Explanation :
C can accept upto 127 maximum number of arguments in a function.

Maximum number of arguments that a function can take is 12

Question No# : 19 out of 20

For the function

int operation (int A[], int n)
{
}
Which is the appropriate calling statement from main program?

Option A. s=operation(A[], 6)
Option B. operation(A, 6)
Option C. k=operation(A, 6)
Option D. d=operation(int A, 6)
True Answer C

Explanation :

For the function

int operation (int A[], int n)
{
}
Which is the appropriate calling statement from main program?

Question No# : 20 out of 20




CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad