Skip to content

Instantly share code, notes, and snippets.

@elorest
Created March 27, 2017 18:39
Show Gist options
  • Save elorest/6dc93d1e9b1ae2c593f04ee84bde506c to your computer and use it in GitHub Desktop.
Save elorest/6dc93d1e9b1ae2c593f04ee84bde506c to your computer and use it in GitHub Desktop.
#include <stdio.h>
struct Person{
char * name;
char * height;
int age;
};
void hello_ptr(const struct Person * p){
printf("Hello %s! Are you really %d and only %s tall?\n", p->name, p->age, p->height);
}
void hello(struct Person p){
printf("Hello %s! Are you really %d and only %s tall?\n", p.name, p.age, p.height);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment