brintos

brintos / llvm-project-archived public Read only

0
0
Text · 649 B · 897c027 Raw
33 lines · cpp
1#include <stdio.h>2struct Summarize3{4    int first;5    int second;6};7 8typedef struct Summarize summarize_t;9typedef summarize_t *summarize_ptr_t;10 11summarize_t global_mine = {30, 40};12 13struct TwoSummarizes14{15    summarize_t first;16    summarize_t second;17};18 19int20main()21{22    summarize_t mine = {10, 20};23    summarize_ptr_t mine_ptr = &mine;24    25    TwoSummarizes twos = { {1,2}, {3,4} };26    27    printf ("Summarize: first: %d second: %d and address: 0x%p\n", mine.first, mine.second, mine_ptr); // Set break point at this line.28    printf ("Global summarize: first: %d second: %d.\n", global_mine.first, global_mine.second);29    return 0;30}31 32 33