Looping through an Array in C..I am getting an error https://code.sololearn.com/c5FX6Cc7uczd/?ref=app
7/6/2022 8:20:10 AM
steve Purpose13 Answers
New AnswerSteve, Code is logically fine. The problem here is the code contains invalid characters that are unacceptable by the compiler. Those invalid characters got accidentally copied, usually from web pages. If you have an encoding option in your code editor then try to set it to ANSI or ISO-8859-15 encoding. There you will see them.
Steve, This may not seem all too different to your original code, but the invalid characters had been removed #include <stdio.h> int main() { int myNumbers[] = { 25, 50, 75, 100 }; int i; for(i = 0; i < 4; i++) { printf("%d\n", myNumbers[i]); } } Here's how it looks in my phone, edited in QuickEdit https://www.sololearn.com/post/1702671/?ref=app
Ipang probably there's an error on the web page..Thanks I'll edit it by typing out manually now
#include <stdio.h> int main() { int myNumbers[] = {25, 50, 75, 100}; int i; for (i = 0; i < 4; i++) { printf("%d\n", myNumbers[i]); } }
I got none of those..can you paste the ANSI and let me c..I used replit code editor and sololearn playground
Steve, Can you open this code in browser (SoloLearn web interface)? there it also shows the invalid characters ...
Steve, You mean you can't access my feed post link? feed post links are only accessible via SoloLearn mobile app ...
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message