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>
- #include <stdint.h>
- typedef struct{
- int32_t a;
- int32_t b;
- } St;
- int main()
- {
- St s1;
- s1.a = 8;
- s1.b = 5;
- printf("(s1) a: %d b: %d\n", s1.a, s1.b);
- St s2;
- s2.a = 9;
- s2.b = 7;
- printf("(s2) a: %d b: %d\n", s2.a, s2.b);
- s1 = s2;
- printf("(s1) a: %d b: %d\n", s1.a, s1.b);
- return 0;
- }
- /*
- output:
- (s1) a: 8 b: 5
- (s2) a: 9 b: 7
- (s1) a: 9 b: 7
- */
Advertisement
Add Comment
Please, Sign In to add comment