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>
- typedef struct Item {
- int a;
- int b;
- } Item;
- int main()
- {
- Item item = { 1, 2 };
- Item item1;
- item1 = (Item){ 1, 2 };
- Item item2;
- item2 = (Item){ .a=1, .b=2 };
- printf("%d %d\n%d %d\n%d %d\n",item.a,item.b,item1.a,item1.b,item2.a,item2.b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment