Hello everyone,Code:#include <stdio.h> #include <windows.h> #include <string.h> int main() { int n = 8; int i = 0; char* password[9] = {"p","a","s","s","w","o","r","d"}; char typePassword[9]; int lenghtPSW; scanf("%s", typePassword); while(i < n) { printf("%s\n",password[i]); i++; } printf("%s\n", typePassword); lenghtPSW = strlen(typePassword); printf("%d\n", lenghtPSW); system("Pause"); if(lenghtPSW == n) { char ArrayPswd[lenghtPSW]; printf("Continue\n"); while(n > 0) { strcpy(ArrayPswd, typePassword); n--; printf("%s\n", ArrayPswd); i++; } } }
could someone help me figure out how use strcpy function to copy each leter to a string and not whole word password, to make it print
p
a
s
s
w
o
r
d
and not 8 password words, new in programing just trying to understand it better.
Thanks