Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for jay1648

Hi, Please suggest me all possible ways of declaring structures in my C codes. I want to be able to create a structure which I can use in my methods without have to use the keyword "struct" each time to declare it. One way I already know of is : …

Member Avatar for hyperion
0
184
Member Avatar for jay1648

[CODE] #include <stdio.h> #include <string.h> typedef struct { char firstName[50]; char lastName[50]; int age; }Person; void ModifyPerson(Person*); int main() { Person person; strcpy(person.firstName, "firstName"); strcpy(person.lastName, "lastName"); ModifyPerson(&person); printf("First Name=%s\nLast Name=%s\n",person.firstName, person.lastName); system("PAUSE"); } void ModifyPerson(Person *p1) { //This doesn't modify the original variable declared in main function Person person = …

Member Avatar for N1GHTS
0
2K