Classical

C Programming MCQ - Functions & Recursion

1:  

In the following 'C' code, in which order the functions would be called ?

a = ( f1(23,14 ) * f2 (12/14)) + f3 () ;

A.

f1,f2,f3

B.

f3,f2,f1

C.

The order may vary from compiler to compiler

D.

None of these

 
 

Option: A

Explanation :


2:  

What error would the following function give on compilation ?

f(int a,int b)
{
int a;
a = 20;
return a;
}

A.

Missing parentheses in return statement

B.

Function should be define as int f(int a,int b)

C.

Redeclaration of a

D.

No error

 
 

Option: C

Explanation :


3:   It is necessary to declare the type of a function in the calling program if the function
A. Returns an integer
B. Returns a non-integer value
C. Is not defined in the same file
D. None of these
 
 

Option: B

Explanation :


4:  

What will be the value retuned by the following function, when it is called with a value 11?

recur(int num)
if ( ( num/2) !=0 )
return ( recur(num/2 ) * 10+num%2 );
else return 1;

A.

Function does not return any value, because it goes into an infinite loop

B.

11

C.

1011

D.

None of these

 
 

Option: C

Explanation :


5:   The function that actually created from a call to a template function is called
A. Generated
B. Inherited
C. Spawned
D. Declassified
 
 

Option: C

Explanation :




Suggest an improvement

 


Syllabus Covered in this section is

  • Elements of C-Tokens
  • Identifiers
  • data types in C
  • Control structures in, C
  •  Sequence, selection and iteration(s).
  • Structured data types in C
  • Arrays, Structures, union, String, and pointers
  • Functions, Recursion
  • Parameter passing, Scope
  •  Binding, Abstract data types

This Section covers Multiple Choice Questions Answers in C Programming . Here questions answers are given with explanation and references. These questions can be used for the preparation of various competitive and academic exams.

Who can benefit - 

  • Any undergraduate or postgraduate student who is seeking C Programming objective type questions answers can use this section.
  • C programming Multiple Choice questions Answers can help you in interview preparation.
  • C Programming Objective type Questions Answers are also used at SSC and HSc level for Exam preparation.
  • C Programming MCQ Questions Answers are also used by engineering students in the preparation of their Exams.
  • Any candidate who has to appear for DOEACC A, B or C level Exam can also learn C Programming Questions Answers.
  • All the teachers who are appearing for Kendriya Vidyalya Sangathan Entrance Exam can also use C Programming Multiple Choice Questions Answers.
  • C Programming MCQs can also be used by the students who are pursuing B.Sc or Msc Computer Science.
  • C Programming Questions Answers can also be used by BCA students for the preparation of their exams.
  • Any student who is pursuing B.Sc. in Information Technology can also use this C Programming mcq Questions Answers.
  •  MCA students can also prepare for their exams using  C Programming Objective Type Questions Answers.
  • You can get free access to C Programming mcq pdf.
  • You can also have online access to C Programming Questions Answers EBook.

Various Search Terms used for this section are

  • C Programming quiz questions with answers

  • C Programming exam questions answers

  • C Programming MCQ questions Answers

  • C Programming MCQ

  • C Programming Questions Answers