The printf function takes text as input and displays it on screen as stdout.
The syntax is as follows:
_printf(const char *format, ...);
Example:
_printf("Helo %s\n", "Thandi");
Output:
Helo Thandi
Chart of specifiers and related functions:
Specifier | Meaning | Types converted |
---|---|---|
%c | Single character | char |
%s | character string | char arrays |
%% | character | % character |
%d | Single decimal integer | int,short |
%i | Unsigned integer | integer |
- Thulane Moko
- Thandiwe Khalaki