Computer Programming: Dr. Osman Parlaktuna Dr. Burak Kaleci
Computer Programming: Dr. Osman Parlaktuna Dr. Burak Kaleci
Computer Programming
Content
Introduction
Standard Input/Output library functions could be used to
manipulate characters and strings.
I int getchar (void) Inputs the next character from the standard
input, in other words, keyboard, and returns it as an integer.
I int putchar (int c) Prints the character stored in c and returns
it as an integer.
I int sprintf( char* s, const char* format, ... ) Equivalent to
printf, except the output is stored in the array s instead of
printed on the screen. Returns the number of characters
written to s.
I int sscanf( char* s, const char* format, ... ) Equivalent to
scanf, except the input is read from the array s rather than
from the keyboard. Returns the number of items successfully
read by the function.
Dr. Osman Parlaktuna Dr. Burak Kaleci Computer Programming
Standard Input/Output Library Functions
String-Manipulation Functions of the String-Handling Library
Comparison Functions of the String-Handling Library
sprintf
sprintf prints formatted data into a char array. The function uses
the same conversion specifiers as printf.
sscanf
Introduction