putc. McGraw-Hill The Complete Reference Fourth Edition
जाहिरात
जाहिरात
714
C + + : T h e C o m p l e t e R e f e r e n c e
putc
#include <cstdio> int putc(int ch, FILE *stream);
The putc( ) function writes the character contained in the least significant byte of ch to the output stream pointed to by stream. Because character arguments are elevated to integer at the time of the call, you may use character values as arguments to putc( ).
The putc( ) function returns the character written on success or EOF if an error occurs. If the output stream has been opened in binary mode, EOF is a valid value for ch. This means that you must use ferror( ) to determine if an error has occurred.
Related functions are fgetc( ), fputc( ), getchar( ), and putchar( ).
putchar
#include <cstdio> int putchar(int ch);
The putchar( ) function writes the character contained in the least significant byte of ch to stdout. It is functionally equivalent to putc(ch, stdout). Because character arguments are elevated to integer at the time of the call, you may use character values as arguments to putchar( ).
The putchar( ) function returns the character written on success or EOF if an error occurs.
A related function is putc( ).
puts
#include <cstdio> int puts(const char * str);
The puts( ) function writes the string pointed to by str to the standard output device. The null terminator is translated to a newline.
The puts( ) function returns a nonnegative value if successful and an EOF upon failure.
Related functions are putc( ), gets( ), and printf( ).
डाउनलोड
जाहिरात