Skip to content

Instantly share code, notes, and snippets.

@pkpio
Created July 24, 2014 08:40
Show Gist options
  • Select an option

  • Save pkpio/ebe541666bfc375e4c65 to your computer and use it in GitHub Desktop.

Select an option

Save pkpio/ebe541666bfc375e4c65 to your computer and use it in GitHub Desktop.
Some testing with C
#include <stdio.h>
#include <stdlib.h>
int main(){
int *ptr_one;
ptr_one = (int *)malloc(sizeof(int)*10);
if (ptr_one == 0)
{
printf("ERROR: Out of memory\n");
return 1;
}
*ptr_one++ = 25;
printf("%d\n", *ptr_one++);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment