Might wish to check again. It is all working a ok with my computers.
Code:
#include <stdio.h>
int main(void)
{
char * name[3]; /* An array of pointers to strings */
/*fgets(name[0], 81, stdin);*/
/*name[0][strlen(name[0])-1]='\0';*/ /*Using to remove the newline character when using fgets */
scanf("%s", name[0]);
/*puts(*name);*/
printf("**%d**", printf("%s\n", name[0]));
return 0;
}
Code:
#include <stdio.h>
int main(void)
{
char * name[3]; /* An array of pointers to strings */
fgets(name[0], 81, stdin);
name[0][strlen(name[0])-1]='\0'; /*Using to remove the newline character when using fgets */
/*scanf("%s", name[0]);*/
/*puts(*name);*/
printf("**%d**", printf("%s\n", name[0]));
return 0;
}
The the other combos, they all work just fine.