2nd Year Computer Science Chapter 10 Input and Output Notes MCQs Bank

computer 12th notes chapter No 10

1. A format specifier always begins with the __ symbol 

 
 
 
 

2. Which of the following format specifier is used for string type data : 

 
 
 
 

3. Which of the following forma specifier is used for character type data 

 
 
 
 

4. How many digits are printed to the right of the decimal point in real number :

 
 
 
 

5. What will be the output of printf(“%d”, ‘A’);  : 

 
 
 
 

6. The escape sequence for carriage return is 

 
 
 
 

7. The escape sequence to produce beep from computer speaker is :

 
 
 
 

8. Instead of the variable name the scanf() requires _________ of the variable to  store the input value into it 

 
 
 
 

9. The field width will automatically _________ if the specified space is not  sufficient to accommodate the value 

 
 
 
 

10. ___is the general form of format specifier for real value :

 
 
 
 

11. Which escape sequence is used for backspace 

 
 
 
 

12. The escape sequence to insert tab in C is :

 
 
 
 

13. ___ is not used in control or format string in a printf() function : 

 
 
 
 

14. ___ is a correct statement to print “Pakistan” in double quotes : 

 
 
 
 

15. ___is used to move the cursor at the beginning of current line : 

 
 
 
 

16. ___is used to get input from user during program execution : 

 
 
 
 

17. Which input function will not print the entered character on the screen

 
 
 
 

18. Which characters cause an escape from the normal interpretation of a string so  that the next character is recognized as having a special meaning.

 
 
 
 

19. 26___characters indicates the beginning of escape sequence :

 
 
 
 

20. _____ is used to get input from user into any types of variables during the  execution of program : 

 
 
 
 

21. How many variables can be used in one printf() function : 

 
 
 
 

22. getch() function is used to input ____ character 

 
 
 
 

23. ___is control string in the statement printf(“Result = %d”,r); : 

 
 
 
 

24. The %x is a format specifier for :

 
 
 
 

25. ___can be used to begin a new line in C : 

 
 
 
 

26. The functions used for input and output are stored in header file : 

 
 
 
 

27. ___ format specifiers is used for float type data :

 
 
 
 

28. scanf() function is used to get data from the 

 
 
 
 

29. ___is used with format specifier to display output left-justified :

 
 
 
 

30. Escape sequence characters always begins with a ___ character

 
 
 
 

31. What will be the output of printf(“%d”,’a’);  : 

 
 
 
 

32. The format specifier %u is used for :

 
 
 
 

33. The function getche() is defined in :

 
 
 
 

34. getche() function is used to input ____ character 

 
 
 
 

35. The escape sequence for backslash is :

 
 
 
 

36. The escape sequence to insert horizontal tab is 

 
 
 
 

37. The printf() function is used to display : 

 
 
 
 

38. ___ is a correct statement to input value to a variable ‘x’ of float data type : 

 
 
 
 

39. The function getch() is defined in : 

 
 
 
 

40. ___function is used to display output on screen : 

 
 
 
 

41. ___is used for flag : 

 
 
 
 

42. Which will be the output of printf(“%c”, ‘A’);  : 

 
 
 
 

43. The ampersand (&) used in “scanf()” function is called :

 
 
 
 

44. Which character is used as address of operator

 
 
 
 

45. ___format specifiers is used for integer type data :

 
 
 
 

Short Questions

1. Define character input?
2. Compare getch and getche functions?
3. Define conio.h?
4. Define field-width specifier for integers?
5. Define field-width specifier?
6. Define scanf ( ) function?
7. Define standard input.
8. Define the general form of format specifier for floating-point numbers?
9. Define the signature of function?
10. Describe the \ddd escape sequence?
11. Differentiate between (\b) and (\f) escape sequences?
12. Differentiate between getch ( ) and getche ( ) functions?
13. Differentiate between gets and puts functions.
14. Differentiate between printf and scanf functions.
15. List some important functions for input.
16. List the format specifiers for character values.
17. List three names of functions used for character input.
18. What are is printf() function?
19. What are standard input functions?
20. What are standard output functions?
21. What is a format specifier?
22. What is an escape sequence?
23. What is control string in printf function?
24. What is getch() function?
25. What is getche() function?
26. What is input statement?
27. What is meant by standard output?
28. What is output statement?
29. What is printf ( ) function?
30. What is the escape sequence?
31. What is the function of & in scanf  statement?
32. What is the problem with scanf function for character input?
33. What is the purpose of %d format specifier?
34. What is the use of “getch” function?
35. What is the use of “getche function?
36. What is the use of “printf” function? Write its syntax
37. What is the use of “scanf” function? Write its syntax.
38. What is the use of field width specifiers in C language?
39. Which characters are used to modify the format of output?
40. Which function is used to clear the screen in C?
41. Which library header file is used to access the standard input output functions? 
42. Why is the ampersand (&) used in scanf function?
43. Write names of two output functions. Where are they stored?
44. Write the purpose of %c format specifier?
45. Write the purpose of using \n escape sequence?
46. Write the purpose of using \t escape sequence

Long Questions

1. What is an output statement? Explain the printf() function of C language.
2. What are format specifier? Also write down the associated data types.
3. What are field width specifiers? Explain with the help of examples.
4. What is an input statement? Also discuss its different types.
5. What are getch() and getche() functions?
6. What are escape sequences?

Leave a Reply

Your email address will not be published. Required fields are marked *