Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PRACTICE FINAL 2
//gcc 5.4.0 #include <stdio.h> #include <stdlib.h> int * mystery(int n) { int *a; a = malloc(sizeof(int) * n); if(a == 0) printf("What happened?\n"); return a; } int main() { int N = 10; int * a; int i; a = mystery(N); for( i=0; i<N; i++);{ a[i]=1000; } for( i = 0; i<N; i++){ printf("%d\n", a[i]); } for( i = 0; i<N; i++){ printf("%d\n", *(a+i)); } return 0; }
run
|
edit
|
history
|
help
0
advanced string manipulation
A_141110_Perfecto
HelloWorld
Loop-worksharing
First program.c
A_141117_Primo01
18BCE2182 ASSESS_1 Q1-2
Arrays
eliminate_duplicates.c
base