Idk why but errored appear again after someone fixed it for me. Previously I was trying to print ID and it worked, but now I'm trying to print "pass" which again leads me to error.
I put the * to declare that it's a string.
I put " " instead of ' ' which I've done in my previous one.
int main()
{
int i;
char* id[8], pass[8]; ///sample data wanted to print
id[0] = "id1";
id[1] = "id2";
id[2] = "id3";
pass[0] = "pass1";
pass[1] = "pass2";
pass[2] = "pass3";
for (i = 0; i < 3; ++i)
{
printf("%s\n", pass[i]);
}
}
User contributions licensed under CC BY-SA 3.0