Hello
when I try to compile this code. my compiler show error message. I have mention code and error message. I think it s compiler error. I am using minGW
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int a=10, b=20;
int sum=0;
clrscr(); // use clrscr() after variable declaration
sum=a+b;
printf("Sum: %d",s);
getch();
}
hello.c: In function 'main':
hello.c:7:5: warning: implicit declaration of function 'clrscr' [-Wimplicit-function-declaration]
clrscr(); // use clrscr() after variable declaration
^
hello.c:9:22: error: 's' undeclared (first use in this function)
printf("Sum: %d",s);
^
hello.c:9:22: note: each undeclared identifier is reported only once for each function it appears in
How to remove error