Ejemplo n.º 1
0
int main(void) {
  int i;
  
  Person student[8] = {
    {"Bob", "Smith", 21},
    {"Jimmy", "John", 18},
    {"Amy", "Goldberg", 20},
    {"Dan", "Marlo", 17},
    {"Sally", "Sorrow", 16},
    {"Daniel", "Lu", 20},
    {"Ziyang", "Lu", 47},
    {"Mary", "Sue", 19}
  };
  
  for (i = 0; i < SIZE; i++) {
    print_person_info(student[i]);
  }
 
  sort_by_age(student); 
  
  printf("--- AFTER SORTING --------------\n");
  
  for( i = 0; i < SIZE; i++){
    print_person_info(student[i]);
    }
  return 0;
}
Ejemplo n.º 2
0
int main(int argc, char *argv[])
{
	char *name = "handsome";
	person_info info;
	info.age = 18;
	info.gender = "male";

	print_person_info(name, &info);
}
Ejemplo n.º 3
0
Archivo: main.c Proyecto: top4e/tmdbclt
static void person_info(tmdb_options_t *opts)
{
	tmdb_configuration_t	*cfg;
	tmdb_person_t		*person;
	tmdb_person_t		*person_p;

	person = tmdb_person_info(opts->id);
	print_person_info(person);
	cfg = tmdb_configuration();
	person_p = person;
	while (person_p) {
		tmdb_save_image_generic(cfg, person_p->profile_path,
					"./images/profiles");
		person_p = person_p->next;
	}
	tmdb_clean_configuration(cfg);
	tmdb_clean_person_type(person);
}