When I am using the terminal on the Mac to compile a .c file, I am getting following errors:

How can I handle these errors?
Here is the code:
#include <stdio.h>
int main()
{
for (int i=1; i<=9; i++)
{
for (int j=1; j<=i; j++)
{
printf ("%d * %d = %2d ", j, i, j*i);
}
printf ("\n");
}
}
You've got an extra character/byte somewhere in there. Here's the text # include <stdio.h> annotated to show which character is at which offset:
# include <stdio.h>
^^^^^^^^^^^
12345678901
As you can see, < should be at offset 11, but the second line of your compiler output says it's at offset 12. That suggests that somewhere between the start of the file and the < you've got a stray byte that shouldn't be there.
I suggest deleting the line and manually retyping it. It's possible you just copied and pasted it but accidentally picked up some invalid characters/bytes while doing that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With