Hello, could anyone help me with C language a little. I'm trying to write a program with pointers, which would scan some words to the array of strings and would print them on a screen. I'm new to C programming, that's why it's so difficult to deal with such a simple task :goofy: Code: #include <stdio.h> #include <string.h> int main () { char * string[3]; int i; .............. return (0); }
search on google yaar!!! that's very silly things. Any p[lace you can get. Try if any doubt then ask.
i was trying to.. but I can't write a right code.. :worried: I can't find mistakes here.. I'm new to C that's why this is difficult for me :undecided Code: #include <stdio.h> #include <string.h> int main () { char* string[3]; int j; for(j=0;j<3;j++) { fgets(string[j], sizeof string[j], stdin); } for(j=0;j<3;j++) { printf("String number %d: \"%s\"\n", j, string[j]); } return 0; }
IT CAN BE BE DONE VERY EASILY CODE: Code: #include<stdio.h> #include<conio.h> void main( ) { char *s[3]; int i; for(i=0;i<3;i++) { gets(s[i]); } for(i=0;i<3;i++) { printf("\n %d string is ",i); printf("%s",s[i]); } } :charming: