#include<stdio.h>
int main ()
{
char a[]="Hello";
int x;
for (x=0;x<6;x++)
{printf("%c",a[x]);} //printing character wise
printf("\n");
//printing string directly
printf("%s\n",a);
return 0;
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Sunday, February 6, 2011
C Program for array of characters/string
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment