ICS Part 2 Computer Science Chapter 10 Online Test With Answers

image
image
image

ICS Part 2 Computer Science Chapter 10 Online Test

Sr. # Questions Answers Choice
1 The statement printf ("%10d",n) will display the value of n: Right justified in ten-character space Left justified in ten-character space Center-justified in ten-character space None of these
2 Which of the following symbol is used with % sign to display output left-justified: - / \ L
3 The general form of format specifier for floating point value: %m.nf m.n% m%.nf m.n%f
4 The format specifier for output are: %d for int and %f for float %c for char %s for string All
5 Which of the following is NOT legal element of control string in printf statement? Ordinary characters Escape sequence Format specifier Variables
6 Which of the following is a possible value of flag? - + Space All
7 Which of the following format specifiers is used for string? %s %c %d %f
8 Which of the following format specifiers is used for float data type? %s %c %d %f
9 Which of the following format specifiers is used for character data type? %d %s %c %f
10 Which of the following format specifiers is used for integer data type? %d %s %c %f
11 Format specifier is started with symbol: ? % & *
12 Which of the following things are determined by format specifier? Data type Field width Format of the value All of these
13 How many variables can be used in one printf function? One Two Many Ten
14 Which of the following is displayed by printf function? Text Constant or values of variable A and B Graphics
15 The format specifier %u is used for: Integer Unsigned short Unsigned float Unsigned long int
Download This Set