MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / main

Function main

base_code/struct.cpp:11–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9};
10
11int main()
12{
13 student s = {10, "asd", 'M'};
14 cout << sizeof(s.num) << endl; // 4
15 cout << sizeof(s.name) << endl; // 10
16 cout << sizeof(s.gender) << endl; // 1
17 cout << sizeof(s) << endl; // 4 + 20 + 4 字节对齐
18 return 0;
19}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected