example-3.1.c

example-3.1.c · 327 B

From the archive c_pointers_examples.tar.gz

Download the archive   « Back to the archive contents

#include <stdlib.h>
#include <stdio.h>

int main()
{
  int *ip;

  ip = (int *) malloc( sizeof(int) );
  *ip = 10;

  /***********************************
   * Uncomment the following line to *
   * see what ip points to           *
   ***********************************/
  //printf( "ip points to %d\n", *ip );
  return 0;
}

Site Stats

Snippets: 1791
Codebases: 571