C
Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds
I/O
Program Structure
- Make sure you have a
main
function with theint
return type. - Make sure your
main
function returns the integer0
on success, otherwise your program will fail with a Runtime Error. You should never return anything other than 0 inmain
.
Compiling
We recommend that you install and use GCC.
Example
Adding two numbers. Numbers will be space separated on a single line.
#include "stdio.h"
int main (void) {
int a, b;
scanf("%d %d", &a, &b);
printf("%d", a + b);
return 0;
}
Submit
- Go to the submit tab and upload the addition program above by copy-pasting and selecting C in the language dropdown.
- Understanding submission feedback.
Sample Explanation
3 + 4 = 7
-
Sample Input 1
3 4
Sample Output 1
7