Hello
I wrote program to find largest of three numbers. I am using gcc compiler. When I was compiling first time it was showing some result but again when I tried to complies same program it showing error. Now I don't why it's happening. what's wrong in program or compiler ?
#include <stdio.h>int main(void){int a, b, c, max;
max = a;printf(" enter three numbers \n ");scanf("%d %d %d",&a,&b,&c);if(max < b){
max = b;}elseif(max < c){
max = c;}printf("\n largest %d ",max);return0;}
Error
hello.c:16:6: error: stray '\240' in program
A A A A A A A A max = c;
^
hello.c:16:7: error: stray '\302' in program
A A A A A A A A max = c;
^
hello.c:16:8: error: stray '\240' in program
A A A A A A A A max = c;
^
hello.c:16:9: error: stray '\302' in program
A A A A A A A A max = c;
you have special characters that are probably not visible in your text editor but are caught by your compiler. just google 'stray \240' and the very first hit explains it well.
you have special characters that are probably not visible in your text editor but are caught by your compiler. just google 'stray \240' and the very first hit explains it well.
I copy paste code, that I have already made because it take a lot of time to write new code every time. I used to do this But then there was no problem. It's been happening for a few days. how to fix this issue
whatever you are copying from, it already has the issue in it. very very simple.. I mean, if you can't debug this incredibly naive mistake, how are you going to write software?