C - Get Put




C - getchar() - Definition and Usage

  • In C- Programming the getchar function is similar to the scanf statement, which will accept a character from the console file (console file is the output window where we can get the input values) or from a file, displays immediately while typing (after typing we need to press Enter key for proceeding).
C Get Char

C - putchar() - Definition and Usage

  • In C- Programming the putchar function is similar to printf statement which will accept a character from the console file (console file is the output window where we can get the input values) or from a file, displays immediately while typing (after typing we need to press Enter key for proceeding).
C Put Char

C - gets() - Definition and Usage

  • In C- Programming gets is similar to scanf statement which is used to scan a line of text from a standard input device.
  • The gets () function will be terminated by a newline character.
  • The newline character won't be included as part of the string.
  • The string may include white space characters.
C Gets

C - puts() Function - Definition and Usage

  • The puts() function automatically inserts a newline character at the end of each string it displays, so each subsequent string displayed with puts() is on its own line.
  • puts() returns non-negative on success, or EOF on failure.
  • Uses of Puts() function in C :
    • puts() is used to Print Message which is similar to printf statement in C .
    • Asks the user for entering the data.
C Puts Function

C - scanf() Function - Definition and Usage

  • In C -Language, scanf() is a predefined function in "stdio.h" header file. It can be used to read the input value from the keyword.
  • The format string must be a text enclosed in double quotes.
  • It contains the information for interpreting the entire data for connecting it into internal representation in memory.
  • Example : integer (%d) , float (%f) , character (%c) or string (%s).
C Scanf Function

C - printf() Function - Definition and Usage

  • The printf function is not the part of the C language, because there is no input or output defined in C language itself.
  • In C , printf() function is used to print the “character, string, float, integer, octal and hexadecimal values” onto the output screen.
  • We use printf() function with %d format specifier to display the value of an integer variable.
  • Similarly, %c is used to display character, %f for float variable, %s for string variable, %lf for double and %x for hexadecimal variable.
  • To generate a newline,we use “\n” in C printf() statement.
C printf Function


View More Quick Examples


Related Searches to C - Get Put

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×