Skip to content

Instantly share code, notes, and snippets.

@paranoidxc
Created August 8, 2014 07:17
Show Gist options
  • Save paranoidxc/188c37978648f4d66fb3 to your computer and use it in GitHub Desktop.
Save paranoidxc/188c37978648f4d66fb3 to your computer and use it in GitHub Desktop.
动态分配数组
#include "HEDE_FILE"
int main() {
int *array, i, n;
scanf("%d", &n);
array = (int *)Malloc( n * sizeof(int) );
for( i = 0; i < n; i ++ ) {
scanf("%d", &array[i]);
}
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment