Skip to main content

Print or Display String using Puts()

1 min read
Share:
On this page (7sections)

puts() displays single or multiple characters of string including spaces to the standard Input device.

Declaration:

puts(variable_name);

Example Declaration:

char ch[10]="Example";

puts(ch);

Remarks:

puts() display string to the screen.

puts() Example Program:

#include<stdio.h>
#include<conio.h>

void main()
{
   char a[20];

   gets(a);
   puts(a);

   getch();
}

Sample Output:

thiyagaraaj.com

thiyagaraaj.com

Continue learning with these related tutorials and programs:

Related Tutorials

Search tutorials