notes/education/software development/ECE1400/Chapter 13 Exercises.md
2024-11-03 14:05:04 -07:00

439 B

  1. The following function calls supposedly write a single new-line character, but some are incorrect. Identify which calls don't work and explain why.

b. printf("%c", "\n"); - This is invalid because the double quotes make \n a string, but it's being displayed with the %cformatting specifier. c. printf(%s, '\n'); - This is invalid because it's trying to display a char using the string formatting specifier. e. printf('\n'