C implementation of the standard library function printf. Printf is used to print formatted strings to standard output. It is a variadic function that takes a format string followed by a number of optional variables and returns the number of characters printed.
Format: _printf("string to print\n");
Description: Prints whatever is inserted between double-quotes. Use the backslash character () to print special characters such as '\n' to print a newline character.
Format specifiers are characters prepended with a percent (%) symbol. The function requires one optional variable per format specifier, with the exception of the "%%" specifier, which simply prints a percent symbol (similar to "%").
Format Specifier: %i or %d
Ex 1: _printf("numA = %i\n", 32);
numA = 32
Ex 2: _printf("A = %d, B = %i\n", numA, numB);
A = 10, B = 13
Ex 3: _printf("The temperature is %i degrees C\n", -18);
The temperature is -18 degrees C
Format Specifier: %c
Ex 1: _printf("You chose option %c!\n", op);
You chose option e!
Ex 2: `_printf("Your grade is an %c\n", 'B');
Your grade is a B
Format Specifier:%s
Ex 1: _printf("Hello, %s!\n", name);
Hello, Matthew!
Ex 2: _printf("Hello, %s, my name is %s.\n", name, "Nick");
Hello, Matthew, my name is Nick.
Nicholas French | github - MetaFrench
Matthew Allen | github - mdallen5393