Closed VishalSingh28 closed 2 years ago
Enter string s1: String s2: Akasg
./Playground/file0.c: In function 'main': ./Playground/file0.c:7:19: warning: array subscript has type 'char' [-Wchar-subscripts] 7 | for (i = 0; s1[i] != '\0'; ++i) { | ^ ./Playground/file0.c:8:11: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:8:19: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:11:7: warning: array subscript has type 'char' [-Wchar-subscripts] 11 | s2[i] = '\0';
http://cpp.sh/937f4
I got the same errors in C++ Shell, with the input "this is a test"
the problem with how input is handled in the server or a GCC version problem....
Please add this issue on the new repo for the backend of the Codex API here: https://github.com/Jaagrav/CodeX-API
Enter string s1: String s2: Akasg
./Playground/file0.c: In function 'main': ./Playground/file0.c:7:19: warning: array subscript has type 'char' [-Wchar-subscripts] 7 | for (i = 0; s1[i] != '\0'; ++i) { | ^ ./Playground/file0.c:8:11: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:8:19: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:11:7: warning: array subscript has type 'char' [-Wchar-subscripts] 11 | s2[i] = '\0';