Thursday 22 August 2013


Problem Solving Methodologies and Programming in C
MCQ and short questions of Chapter 4

1. What is the use of getchar()?
(A) Get one character from keyboard (B) Get many character from keyboard
(C) Get one digit from keyboard (D) Get many digits from keyboard
2. What is the use of putchar()?
(A) Display one character onto screen (B) Display many character onto screen
(C) Display one digit onto screen (D) display many digits onto screen
3. What is the use of pow()?
(A) x^y (B) x*x (C) x/y (D) x%y
4. What is the use of sqrt()?
(A) Square root of any number (B) Multiplication of any number
(C) Cube of any number (D) Modulo division of any number
5. Which function is used for taking float number remainder?
(A) fmod() (B) fabs() (C) floor() (D) ceil()
6. What is the use of gets() in program?
(A) get only one character (B) get only one line
(C) get only one word (D) get strings
7. What is the use of getch() in program?
(A) see output (B) get only one character
(C) get only one word (D) by default in program
8. What is the limitation of getch()?
(A) not echo the character (B) not get the character
(C) not get the word (D) not get the line
9. What is the use of getche() in program?
(A) get only one character (B) get only one line
(C) get only one word (D) None of these
10. What is the use of strcmp() in program?
(A) strings compare (B) strings copy (C) strings concatenatess (D) strings compile
11. What is the use of strncat() in program?
(A) no. of strings compare (B) no. of strings copy
(B) no. of strings concatenatess (D) no. of strings compile
12. Which header file is required for string handling function?
(A) string.h (B) stdlib.h (C) ctype.h (D) stdio.h
13. Which header file is required for character function?
(A) string.h (B) stdlib.h (C) ctype.h (D) stdio.h
14. Which header file is required for delay()?
(A) process.h (B) dos.h (C) stdio.h (D) conio.h
15. How many types of functions are available in C?
(A) 1 (B) 2 (C) 3 (D) 4
16. How many type of user defined function are in C ?
(A) 1 (B) 2 (C) 3 (D) 4
17. What is the other name of function header part?
(A) function signature (B) function name (C) function body (D) function arguments
18. When we make a mistake in function name in definition that time which error is generate?
(A) function name wrong (B) function header wrong
(C) function prototype (D) function signature wrong
19. In main(), when any function is call, that parameter is known as :
(A) formal argument (B) actual argument (C) not define (D) normal arguments
20. When one function is call itself that is known as:
(A) nested function (B) recursive (C) itself call (D) simple call
21. Which data type return by main function by default?
(A) char (B) int (C) float (D) double
22. How many values can return by function?
(A) 1 (B) 2 (C) 3 (D) 4
23. When function call other function that is known as :
(A) nested function (B) recursive (C) itself call (D) simple call
24. Which data type is used when function not return any value?
(A) char (B) int (C) float (D) void
25. What is the scope of global variable in program?
(A) Only one function (B) Within one function (C) Two functions (D) Entire program
26. When return statement is required in program?
(A) Function return data type void (B) Function should return value
(C) Function not return any value (D) None of these
27. What is optional in function prototype declaration?
(A) variable name (B) data type (C) semi colon (D) function name
28. What values are pass in call by reference technique?
(A) original values (B) formal values (C) address of variable (D) other
29. What is the name in function definition user gives the arguments?
(A) Actual arguments (B) Formal arguments (C) Simple arguments (D) Multi Arguments
30. When large program devide in more that sub program known as....
(A) sub program (B) sub function (C) multifunction (D) nested function
31. Every string terminates with which character?
(A) /0 (B) '0' (C) \0 (D) "0"

1. Write down types of functions.
2. What is the extension of header file?
3. What is the full form of UDF?
4. What is the use of strcpy()?
5. What is the use of strncpy()?
6. What is the use of strcat?
7. What is the use of strncat()?
8. What is the use of strlen()?
9. What is the use of strcmp()?
10. What is the use of strncmp()?
11. What is the use of strrev()?
12. To use printf() function which header file should be used?
13. To use scanf() function which header file should be used?
14. To use clrscr() function which header file should be used?
15. To use getch() function which header file should be used?
16. To use UDF in C program which components should be used?
17. How many ways we can call a function?
18. What is recursive function?
19. Write down types of UDF?
20. What is the other name of Library function or Built-in function?

     Best of Luck