Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- typedef struct helper{
- int nNo;
- int nAge;
- char sName[10];
- }struhelper;
- int main()
- {
- int i = 0;
- struhelper helpers[] ={
- [0] = {0, 15, "tom"},
- [1] = {1, 25, "hellon"},
- [2] = {2, 23, "jim"},
- [3] = {3, 21, "lilei"}
- };
- for(i=0;i<4;i++)
- printf("No=%d, Age=%d, Name=%s\n", helpers[i].nNo, helpers[i].nAge, helpers[i].sName);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement