Skip to Main Content
Xpress Learning - Computer Fundamentals of Programming an IT by Pearson
book

Xpress Learning - Computer Fundamentals of Programming an IT by Pearson

by Ashok N. Kamthane, Rohit Khurana
May 2024
Beginner to intermediate content levelBeginner to intermediate
465 pages
16h 14m
English
Pearson India
Content preview from Xpress Learning - Computer Fundamentals of Programming an IT by Pearson
II-18 Programming Concepts
int main()
{
printf("Demo of return keyword");
return 0; /* '0' implies successful execution of program*/
}
16.   What is the difference between %f and %g control strings? Whether both can be used for 
representing float numbers?
Ans:  The format string %f or %g is used to represent floating point number or real number in the form
of fraction, i.e., decimal notation. Precise results are obtained by %f. The precision indicates the number of
significant digits. In case precision is missing, i.e. for zero precision, fractional part appears with six digits.
With %g the real number or floating point number appears up to two decimal ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Express Learning - Computer Fundamentals and Programming

Express Learning - Computer Fundamentals and Programming

Ashok Kamthane, ITL ESL
Windows® Internals, Sixth Edition, Part 2

Windows® Internals, Sixth Edition, Part 2

David A. Solomon Mark E. Russinovich and Alex Ionescu

Publisher Resources

ISBN: 9781299954878