Better HN
topnewbestaskshowjobs
Log inSign up

dclayton

1 karma · joined Jan 12, 2008 (18y ago) · 1 submissions

Submissions

comment 18y ago · link · parent

Try looking at the following alternative notation, and see if it makes more sense:

  #include <stdio.h>
  #include <stdlib.h>
  
  void fn(char* c) {
      printf("[%c]\n", *c);
  }
  
  int main() {
      char* c;
      c = malloc( sizeof(char) );
      *c = 'a';

      printf("start\n");
  
      fn(c);
  
      return 0;
  }
  
Regards,

dclayton