What does the format %10.2 mean when included in a printf statement?



What does the format %10.2 mean when included in a printf statement?..

Answer / Madan Lal Meena

The format `%10.2` is a conversion specification used within a `printf()` function. Here, `10` specifies the minimum field width, and `2` specifies the precision (number of decimal places). So, this will print a value with at least 10 characters (padded with spaces if necessary), and 2 decimal places.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Explain what are the standard predefined macros?

1 Answers  


atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation

0 Answers  


Tell me what are bitwise shift operators?

1 Answers  


what is the output of below code int x=8,y; x>>=2; y=x; what is y value. NOTE:EXPLANATION IS COMPALSARY with binary bits

2 Answers   Wipro,


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1 Answers  


print the palindrome numbers in between 0 to n

1 Answers  


AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?

13 Answers   HCL,


Given a string write a program to print all alphabetical characters in the order of their occurance first,followed by the sum of the numeric characters then followed by the special characters in the order of their occurance.

1 Answers   College School Exams Tests, Wipro,


How can I change their mode to binary?

1 Answers  


Explain what is the difference between null and nul?

1 Answers  


How to calculate Total working time using Login and logout?

2 Answers   CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,


how many error occurs in C language ?

22 Answers   Infosys, Wipro,


Categories