+ 2

printf("%d\t%s\t%4.2f\n", cs1.id, cs1.title, cs1.hours);

here, 4.2f refers what?

11th Jun 2019, 4:54 AM
krishna kumari
krishna kumari - avatar
1 Resposta
+ 3
It means at least for digits before the '.' and exactly 2 decimal places. So 5.0 would be 0005.00 and 12345.12345 would be 12345.12
11th Jun 2019, 5:22 AM
Vlad Serbu
Vlad Serbu - avatar