Thursday, July 9, 2009

How to create an array of Strings Using C?

eg I have the strings


one


two


three


how do i read them into an array

How to create an array of Strings Using C?
char * [100] var ; // declaration


or


char ** var;


char *[] var= {"one","two","three"}; // initialize directly





use loop either for or while





for(int i = 0 ;i %26lt; no_of_string;i++)


printf("%s",var[i]);





hope it will helpfull








bye


No comments:

Post a Comment