Пример #1
0
int main(){
	person_t *person = create_person();
	printPersonDetails(person);

	printf("\nSize of person: %d bytes\n", (int)sizeof(*person));
	printf("Size of pointer to person: %d bytes\n", (int)sizeof(person));

	return 0;
}
Пример #2
0
int main(int argc, char **argv)
{
	Person testPerson;
	strcpy_s(testPerson.firstName, sizeof(testPerson.firstName), "First");
	strcpy_s(testPerson.lastName, sizeof(testPerson.lastName), "Last");
	strcpy_s(testPerson.ID, sizeof(testPerson.ID), "123456");
	testPerson.salary = 100.0;

	printPersonDetails(&testPerson);

	getchar();
	return 0;
}
Пример #3
0
int main(){
	person_t person = create_person();
	printPersonDetails(person);
	return 0;
}