Register | Sing In

New posts

Stacks in C programming Linked Lists in C programming File Input/Output in C programming Check prime numbers in C Programming C Programming Enumeration C Programming Union

Archives

2013-10 2013-09 2013-08

Standard Input/Output functions of library stdio.h in C

September 11, 2013 Posted by: GPA Views: 700 0 comments

<stdio.h> library includes functions that allow to input and to display information. 

Function  Description

int getchar(void);

Reads character from the keyboard and returns it as an integer.
char *fgets(char *str, int n, FILE *filestream);




Reads characters from the stream into the array str until a newline or EOF character is encountered. Returns the string that was read into variable str.
int putchar(int character);
Shows the character stored in variable "character" and returns it as an integer.
int puts(const char *str );
Shows the string str and a newline character is appended to the output.
int sprintf( char *str, const char *format, ... );
The output information is stored in the pointer of char str. It does not print information on the screen. Returns the number of characters written to str.
int sscanf( char *str, const char *format, ... );
The input is read from the array str rather than from the keyboard. Returns the total number of characters successfully read by the function.

 

 total number of characters

0 Comments...

Leave a Reply

Please, Sing In to leave a Reply for this material.



Online Chat

LiveZilla Live Help

Popular posts

Function strtok in C programming Check prime numbers in C Programming C Programming Union Linked Lists in C programming File Input/Output in C programming C Programming Enumeration

RSS-subscribe

New materials

Subscribe