Chapter - 12: Console Input-Output

Which of the following can a format string of a printf() function contain:


C
Sections
5
Exercises

1. Characters, format specifications and escape sequences
2. Character, integers, and floats
3. Strings, integers and escape sequences
4. Inverted commas, percentage sign, and the backslash character


Ans: 1. Characters, format specifications and escape sequences because format specifications manage the space that a number or float will take and escape sequences move the cursor and do many formatting in an array of characters i.e. strings.


© 2020 Garbage Valuegarbage value logo