Last active
August 17, 2016 04:51
-
-
Save rye761/1cc159d6384e6f3a266bc59505d33b8c to your computer and use it in GitHub Desktop.
Not sure why this doesn't cause an error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char const *argv[]) { | |
int *my_array = malloc(sizeof(int)); | |
my_array[0] = 3; | |
my_array[1] = 4; | |
printf("%d, %d\n", my_array[0], my_array[1]); | |
free(my_array); | |
return 0; | |
} | |
/* Produces: 3, 4. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment