In this tutorial, we are going to write a C Program to show the input and output of a string in C Programming with practical program code and step-by-step full complete explanation.

C Program to show input and output of a string


C Program to show input and output of a string

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

void main()
{
	char a[50];

	clrscr();

	printf("Enter any string: ");
	gets(a);
	puts(a);

	getch();
}


Output

 
Enter any string: hi everyone
hi everyone