GET EDUCATE

Contents
Basics of C Programming

⯈Basic C Programs

puts function in C

  • This function is used to print the string on the output screen.
  • It is an unformatted output function.
  • Prototype:
int puts(char *);
  • This function returns the non-negative answer on success and EOF (End Of File) on failure.
#include<stdio.h>
int main()
{
char str[100];
gets(str);
puts(str);
return 0;
}
output gets
output window of gets and puts function
Scroll to Top