Loading...

C Multiple Choice Questions

Our C questions and answers focuses on all areas of C programming language covering 100+ topics in C

C Functions-1 MCQs

C Functions-1


1. Choose correct statement about Functions in C Language.

a) A Function is a group of c statements which can be reused any number of times
b) Every Function has a return type
c) Every Function may no may not return a value
d) All the above



2. Choose a correct statement about C Function?
void main() {
  printf("Hello");
}

a) "main" is the name of default must and should Function
b) main() is same as int main()
c) By default, return 0 is added as the last statement of a function without specific return type
d) All the above



3. A function which calls itself is called a ___ function.

a) Self Function
b) Auto Function
c) Recursive Function
d) Static Function



4. The keyword used to transfer control from a function back to the calling function is
int **a;

a) switch
b) goto
c) go back
d) return



5. How many times the program will print "Algbly"?
int main() {
  printf("Algbly");
  main();
  return 0;
}

a) Infinite times
b) 32767 times
c) 65535 times
d) Till stack overflows



6. Determine Output :
void show() {
  printf("PISTA ";
  show();
}

void main() {
  printf("CACHEW ");
  return 10;
}

a) PISTA CACHEW
b) CASHEW PISTA
c) PISTA CASHEW with compiler warning
d) Compiler error



7. What are the types of functions in C Language?

a) Library Functions
b) User Defined Functions
c) Both Library and User Defined
d) None of the above



8. Choose correct statements about C Language Pass By Value.

a) Pass By Value copies the variable value in one more memory location
b) Pass By Value does not use Pointers
c) Pass By Value protects your source or original variables from changes in outside functions or called functions
d) All the above



9. What is the limit for number of functions in a C Program?

a) 16
b) 31
c) 32
d) No Limit



10. Every C Program should contain which functionEvery C Program should contain which function?

a) printf()
b) show()
c) scanf()
d) main()



- Related Topics