C Printf Online Exam Quiz
C Printf GK Quiz. Question and Answers related to C Printf. MCQ (Multiple Choice Questions with answers about C Printf
Choose the correct description for control string %-+7.2f.
Options
A : – means display the sign, + means left justify, 7 specifies the width and 2 specifies the precision
B : – means left justify, + means display the sign, 7 specifies the width and 2 specifies the precision
C : – means display the sign, + means left justify, 7 specifies the precision and 2 specifies the width
D : – means left justify, + means display the sign, 7 specifies the precision and 2 specifies the width
The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the control string?
Options
A : %[flags][.precision][width][length]specifier
B : %[flags][length][width][.precision]specifier
C : %[flags][width][.precision][length]specifier
D : %[flags][.precision][length][width]specifier
What symbol is used to Left-justify within the data given field width?
Options
A : -(minus sign)
B : +(plus sign)
C : #
D : 0
What error is generated on placing an address operator with a variable in the printf statement?
Options
A : compile error
B : run-time error
C : logical error
D : no error
What specifies the minimum number of characters to print after being padded with zeros or blank spaces?
Options
A : flags
B : length
C : width
D : precision
________is used to define the type and the interpretation of the value of the corresponding argument.
Options
A : precision
B : specifiers
C : flags
D : decimal
The maximum number of characters to be printed is specified by __________
Options
A : precision
B : width
C : length
D : flags
A conversion specification %7.4f means ____________
Options
A : print a floating point value of maximum 7 digits where 4 digits are allotted for the digits after the decimal point
B : print a floating point value of maximum 4 digits where 7digits are allotted for the digits after the decimal point
C : print a floating point value of maximum 7 digits
D : print a floating point value of minimum 7 digits where 4 digits are allotted for the digits after the decimal point
Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.
Options
A : specifier
B : flags
C : precision
D : decimal
The parameter control string in the printf () is a C String that contains text to be __________
Options
A : taken from a standard output device
B : written on to the standard output device
C : received from the standard output device
D : nothing can be said
Chemical Engineering Basics - Part 1 more Online Exam Quiz
C Multiple Choice Non Local Jumps