Introduction - C Programming
pre-processor : #include;the main work of pre-processor is to initialize the environment of program, i.e to link the program with the header file <stdio.h>.
header file:collection of built-in functions
main() function:program execution starts
c input output functions:
printf() function returns the number of characters printed by it
int i = printf("studytonight");
in this program i will get 12 as value, because studytonight has 12 characters.
scanf() returns the number of characters read by it.
getchar() function reads a character from the terminal and returns it as an integer.reads only single character at a time
putchar() function prints the character passed to it on the screen and returns the same character. this function puts only single character at a time
gets() function reads a line from stdin into the buffer pointed to by s until either a terminating newline or eof (end of file).
puts() function writes the string s and a trailing newline to stdout.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment