Show More
Commit Description:
translates test_request input/output file paths for remote grading test_request
Commit Description:
translates test_request input/output file paths for remote grading test_request
References:
File last commit:
Show/Diff file:
Action:
test/data/add_too_much_memory_dynamic.c
| 20 lines
| 256 B
| text/x-c
| CLexer
|
|
r23 | #include <stdio.h> | ||
#include <stdlib.h> | ||||
int main() | ||||
{ | ||||
int a,b; | ||||
|
r75 | int r; | ||
|
r23 | char *huge_array; | ||
|
r75 | r = scanf("%d %d",&a,&b); | ||
|
r23 | |||
|
r114 | huge_array = (char *)malloc(5*1024*1024); | ||
|
r23 | if(huge_array==NULL) | ||
printf("NO!"); | ||||
else | ||||
printf("%d\n",a+b); | ||||
return 0; | ||||
} | ||||