+ 1
please help me to find the error in this C code
I am a beginner to c language. Please help me to find the error of the code. #include <stdio.h> #include <string.h> void main() { char i; char arr[23]; printf("Enter your name? \n");` scanf("%c",&arr[i]); for(int v=0;v<=strlen(arr);v++) { printf("%c",arr[v]); } }
2 odpowiedzi
+ 1
scanf("%s",arr); will be enough to get a string