Friday, 9 May 2014

SIMPLE C PROGRAM FOR PRINTING STRINGS

SIMPLE C PROGRAM FOR STRINGS

#include      //header files stdio.h
#inlcude    //header files conio.h
main()                         //main() function
{                              //start of the program
char str[10];             //declare string variable
printf("enter the string");
scanf("%s",str);          //read strings from user
printf("the entered strings are \n %s",str); //output displayed
getch(); 
}                                    //end of the program

No comments:

Post a Comment