Scroll To Top
News Trending
Related Posts Plugin for WordPress, Blogger...
Related Posts Plugin for WordPress, Blogger...
Related Posts Plugin for WordPress, Blogger...

C program to Input and print a "String"

In this program you can input a string and print it on the screen.


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

void main()
{
char str[100] ={'p','c','w','o','r','l','d','l','i','f','e'};
clrscr();
printf("\n%s\n",str);
getch();
printf("Enter a string\n");
scanf("%s",str);
printf("\nEntered string is\n%s \n",str);
getch();
}

Share This:

Labels:

No Comment to " C program to Input and print a "String" "