Thursday, September 3, 2020

gets() and puts() function

 gets() :


• The function gets() receives the string from the standard input divice.

• It accepts string variable name as parameter,and fills the string variable with characters that are input from the keybord,till a newline character is encountered.

• At the end, the function gets() appends a null terminator. 

• Syntax:

                         gets(str);

  declaration: int gets(char*string                                     pointer)


Puts() :

 • The funtion puts() display the string to the standard o/p device.

• It display the content of string_variable_name that has been passed as a parameter to output device.

• Syntax:

                       puts(str);

declaration :int puts(const char*string                           pointer);

No comments:

Post a Comment

Object Paradigm Oriented Programming in C++ / object oriented programming / History of C++/ paradiagram in c++/C devolop, Operating System, Unix operating system, Assembly language, popular in world, Programming language.

  Object Paradigm Oriented Programming  Two programmers, Brian Kernighan and Dennis Ritchie developed a new language called C, in 1972.  C l...