Quiz: Functions
If you haven't already done so, be sure to read through Functions in C. Otherwise, best of luck with the quiz!
1. Which is not a proper prototype? A. int funct(char x, char y); B. double funct(char x) C. void funct(); D. char x(); Answer=B. 2. What is the return type of the function with prototype: "int func(char x, float v, double t);" A. char B. int C. float D. double Answer=B. 3. Which of the following is a valid function call (assuming the function exists)? A. funct; B. funct x, y; C. funct(); D. int funct(); Answer=C. 4. Which of the following is a complete function? A. int funct(); B. int funct(int x) {return x=x+1;} C. void funct(int) {printf( "Hello" ); D. void funct(x) {printf( "Hello" ); } Answer=B. Next lesson: Lesson 5, switch case |
No comments:
Post a Comment