ISRO CS 2015
August 27, 2024
C-Programming
August 27, 2024
ISRO CS 2015
August 27, 2024
C-Programming
August 27, 2024

C-Programming

Question 40
What is the output when the following segment of ‘c’ code is executed?

Void main (){

Float a = 123.456

printf(“%7.2f, %7.3f, %12e, a, a, a);

}

A
123.450, 123.4560, 1.234560e+02
B
123.46, 123.456, 1.234560e+02
C
123.456000, 123.456, 0.1234560e+03
D
123.45, 123.4560, 1.234560e+02
Question 40 Explanation: 
→The conversion specifier %7.2f tells printf to display the value as a 7-character wide field with 2 digits following the decimal point.
→The %e format uses scientific notation, i.e. one digit before the decimal separator and an exponent for scaling
Correct Answer: B
Question 40 Explanation: 
→The conversion specifier %7.2f tells printf to display the value as a 7-character wide field with 2 digits following the decimal point.
→The %e format uses scientific notation, i.e. one digit before the decimal separator and an exponent for scaling
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!