I am getting this error when I try to compile... I am new to coding in general, so it might be obvious and I'm not seeing it.
My code is:
#include <stdio.h>
int main ()
{
float x[7] = 23.0, -28.6, 30.2, 29.0, -8.0, -30.0, 27.8;
int i = 3;
printf ("%.2f \n", x[i + 1]);
return 0;
}
It's a super simplistic code that is just supposed to output one number... However, every time I try to compile I get this error:
test.c:4:8: error: stray ‘\342’ in program
float x���[7] = 23.0, -28.6, 30.2, 29.0, -8.0, -30.0, 27.8;
^
test.c:4:9: error: stray ‘\200’ in program
float x���[7] = 23.0, -28.6, 30.2, 29.0, -8.0, -30.0, 27.8;
^
test.c:4:10: error: stray ‘\213’ in program
float x��[7] = 23.0, -28.6, 30.2, 29.0, -8.0, -30.0, 27.8;
^
test.c:6:21: error: stray ‘\342’ in program
printf ("%.2f \n", x���[i + 1]);
^
test.c:6:22: error: stray ‘\200’ in program
printf ("%.2f \n", x���[i + 1]);
^
test.c:6:23: error: stray ‘\213’ in program
printf ("%.2f \n", x��[i + 1]);
What might be causing this?