Hacker Newsnew | past | comments | ask | show | jobs | submit | dclayton's commentslogin

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


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: