C Programming Quiz : Functions in C
C Programming Quiz : Functions in C
1. What is Function?
- A) A function is a return type a c program.
- B) A function is a inbuilt keyword in C Programming.
- C) A function is a group of statements that together perform a task.
- D) A function is a statement itself.
Answer is C)
Description:
A function is a group of statements that together perform a task.
2. A Function is a group of c statements which can be reused any number of times.
- A) True
- B) False
Answer is A)
Description:
It's True, A Function is a group of c statements which can be reused any number of times.
3. What is the output of the C statement?
- A) Compiler error
- B) HIDE
- C) No output
- D) None of the above/li>
Answer is B)
Description:
Notice that show() function is defined inside main() function. It will not produce a compile error. But, it is not recommended to define a FUNCTION INSIDE A FUNCTION. DO NOT DO.
4. What is the output of C Program?
- A) Coding Taggers
- B) CodingTaggers
- C) Coding
- D) Taggers Coding
Answer is D)
Description:
First show() function is called. So it prints Taggers first.
5. Choose a right about Functions in C Language.
- A) A function name can not be same as a predefined C Keyword.
- B) A function name can start with an Underscore( _ ) or A to Z or a to z.
- C) Default return type of any function is an Integer.
- D) All the above.
Answer is D)
Description:
Read all the above options.
6. A function which calls itself is called a ___ function.
- A) Recursive Function
- B) Static Function
- C) Self Function
- D) Auto Function
Answer is A)
Description:
A function which calls itself is called a Recursive Function.
7. Choose correct statements about C Language Pass By Value.
- A) Pass By Value protects your source or original variables from changes in outside functions or called functions.
- B) Pass By Value copies the variable value in one more memory location.
- C) Pass By Value does not use Pointers.
- D) All of the above.
Answer is D)
Description:
Read all the options given above.
8. How many values can a C Function return at a time?
- A) Maximum of 8 values
- B) Maximum of three values
- C) Maximum of two values
- D) Only One Value
Answer is D)
Description:
Using a return val; statement, you can return only one value.
9. What are types of Functions in C Language?
- A) Both Library and User Defined
- B) User Defined Functions only
- C) Library Functions only
- D) None of the following.
Answer is A)
Description:
Both Library and User Defined types of Functions in C Language.
10. What is the limit for number of functions in a C Program?
- A) 16
- B) 32
- C) 31
- D) None of the above.
Answer is D)
Description:
Yes. There is no limit on the number of functions in a C Program.
Submit your Quiz Question
Submit your quiz question to us, We will feature your quiz question in our blog with your credits.
Post a Comment