Possible Reasons For Errors:
1. Runtime Error :
a. using void main() instead of int main()
b. In int main() function not writing return 0;
This doesnt have return 0;
2. Compile Time Error :
Make sure you are not getting any warning in your program.
Since it means you are writing a bad code and judge
evaluates such code as Compile Time Error
To Compile your program : To compile prog.c
Write on terminal :
gcc Wall prog.c o pg lm
Or
gcc Wall prog.c lm
-Wall option in gcc helps to see if any warning is there or not
Ex : Problem 1 : Exchange
Since if you declare long int it means give %ld format
specifier than %d.
This warning you will see if you use Wall option while
compiling
3. Wrong Answer :
a. Your logic may be incorrect OR
b. You are not matching the output format
Ex :
In this code prompting user is not correct since it is not
matching the required Input Format.
Also Output format is not correct since it is printing yes
but it is expected YES so please read the Problem
Description correctly with Input and Output
Format.
4. Presentation Error:
a. Missing newline in the end while printing
Ex : Problem 1 : Exchange
Finally a Humble Request : Please submit your code after
compiling your program on your terminal. We are seeing lot of
student they are not even compiling their program on their
terminal and checking against the Sample Input given in
Problem Description.
*************************************************