Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- /////////////////////////////////////////////
- struct T
- {
- int n;
- float f;
- double fMassa;
- char szName[99];
- };
- void monitof(T *p);
- ////////////////////////////////////////////////////////////////////////////////////
- int main()
- {
- T t1, t2, tArr[99];
- t1.n = 12;
- t1.f = 1.57;
- strcpy(t1.szName, "Dima");
- t2.n = 11;
- t2.f = 1.41;
- strcpy(t2.szName, "Olga");
- monitof(&t1);
- monitof(&t2);
- }
- //////////////////////////////////////////////////////////////
- void monitof(T *p)
- {
- printf("age = %4d\n", (*p).n);
- printf("Hight = %.2f\n", p->f );
- printf("Name = %s\n", p->szName );
- printf("- - - - - - - - - - \n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement