Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-std=c99 -Wall -Wextra -Wpedantic -Wshadow
- #include <stdio.h>
- #include <stdlib.h>
- struct st1{
- int a;
- int b;
- };
- typedef struct st2{
- int a;
- int b;
- } St2;
- typedef struct{
- int a;
- int b;
- } St3;
- struct{
- int a;
- int b;
- } st4 = { 10, 11 };
- int main()
- {
- struct st1 s1;
- s1.a = 2;
- s1.b = 3;
- printf("%d %d\n", s1.a, s1.b);
- struct st2 s2a;
- s2a.a = 4;
- s2a.b = 5;
- printf("%d %d\n", s2a.a, s2a.b);
- St2 s2b;
- s2b.a = 6;
- s2b.b = 7;
- printf("%d %d\n", s2b.a, s2b.b);
- St3 s3;
- s3.a = 8;
- s3.b = 9;
- printf("%d %d\n", s3.a, s3.b);
- printf("%d %d\n", st4.a, st4.b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement