12th class (Fsc) computer unit 10 MCQs
26. The function used for input and output is stored in:
a. Math.h
b. Stdio.h
c. Tan.h
d. Conio.h
27. Which of the following is not a valid escape code?
a. \y
b. \t
c. \f
d. \r
28. Which character signifies the beginning of an escape sequence?
a. //
b. {
c. \
d. \
29. Which of the following escape sequence is used to erase a character left to the cursor position?
a. \f
b. \b
c. \c
d. \del
30. Which of the following is displayed by printf function?
a. Text
b. Constant value of variable
c. Both A & B
d. None
31. Format specifier is started with symbol:
a. &
b. ?
c. %
d. None
32. Which of the following format specifier is used for integer data type?
a. %c
b. %d
c. %f
d. %s
33. Which of the following format specifier is used for character data type?
a. %c
b. %s
c. %d
d. %f
34. Which of the following format specifier used for string?
a. %c
b. %f
c. %s
d. %d
35. Which of the following is a possible value of flag?
a. Space
b. –
c. +
d. All of these
36. Which of the following is a possible value of flag?
a. Format specifier
b. Ordinary characters
c. Variable
d. Escape sequence
37. The format specifier for output are:
a. %s for string
b. %d for int and %f for float
c. %c for char
d. All
38. The general form of format specifier for floating point value:
a. M%.nf
b. %m.nf
c. m.n%f
d. M.n %
39. Which of the following symbol is used with % sign to display output left-justified?
a. \
b. –
c. /
d. None
40. The statement printf (“%10d”,n) will display the value of n:
a. Center justified in ten character space
b. Right justified in ten character space
c. Left-justified in ten-character space
d. None
41. The statement printf(“%10d,n) will display the value of n:
a. Center justified in ten character space
b. Right-justified in ten character space
c. Left justified in ten-character space
d. None
42. An ampersand before the name of a variable denotes:
a. Address
b. Actual value
c. Data type
d. Variable Name
43. Which escape sequence can be used to insert a Tab in C?
a. \m
b. \a
c. \n
d. \b
44. Which escape sequence can be used to beep from speaker in C?
a. \t
b. \a
c. \n
d. \b
45. Which escape sequence can be used to move the cursor at the beginning of current line in C?
a. \m
b. \a
c. \r
d. \b
46. %f is used for:
a. Integer
b. Double
c. Short
d. Float
47. Which of the following is not a valid escape code?
a. //
b. \t
c. /
d. \
48. Scanf function is used to input:
a. Numeric value
b. String value
c. Both A & B
d. None of the above
49. Scanf function stores input value into:
a. Position of a variable
b. Signature of a variable
c. Address of a variable
d. Constant
50. In statement scanf(“%f,& kilometer); , kilometer is a(n):
a. String variable
b. Integer variable
c. Double variable
d. Float variable
51. Function which used to get input from the user:
a. clrscr()
b. printf()
c. puts()
d. scanf()
52. The & symbol is scanf function indicate variable’s:
a. format
b. address
c. data type
d. value
53. Which of the following function is used to input data in C language?
a. Sqrt( )
b. Scanf
c. Getch
d. Printf
54. The function getche() is defined in:
a. math.h
b. stdio.h
c. conio.h
d. string.h
55. Getch( ) is a part of:
a. Math
b. Stdio
c. Conio
d. All of above
56. The function getch() is defined in:
a. String.h
b. Stdio.h
c. Math.h
d. Conio.h
57. The ASCII code for escape key:
a. 29
b. 27
c. 30
d. 28
58. getch() is a part of:
a. math.h
b. stdio.h
c. string.h
d. conio.h
59. Which function is used to input data in C-program?
a. Getche( )
b. Scanf
c. Getch( )
d. All of these
Click here to go directly on chapter no.11