skip to main |
skip to sidebar
RSS Feeds
The blog on almost everything!
The blog on almost everything!
Wednesday, February 25, 2009
Posted by Sarathganesh
This C program will ask the user for a name or phrase and then display it.Here's the code and it's output,
CODE:
#include<stdio.h>
void main()
{
char a[];
printf("Please enter a name or phrase\n");
scanf("%s", &a);
printf("The phrase you entered was : '%s'", a);
}
Please enter a name or phrase
Sarathganesh
The phrase you entered was : 'Sarathganesh'