- int i=0;
- int j;
- j = i;
- typedef struct stu
- {
- char name[10];
- char sno[10];
- int score;
- }stu;
- stu a;
- strcpy(a.name, "gnuser");
- strcpy(a.sno, "0000001");
- a.score=59; // f***k
- stu b;
- b = a;
反汇编一看,
- 0x08048762 <main+220>: mov -0x30(%ebp),%eax
- 0x08048765 <main+223>: mov %eax,-0x58(%ebp)
- 0x08048768 <main+226>: mov -0x2c(%ebp),%eax
- 0x0804876b <main+229>: mov %eax,-0x54(%ebp)
- 0x0804876e <main+232>: mov -0x28(%ebp),%eax
- 0x08048771 <main+235>: mov %eax,-0x50(%ebp)
- 0x08048774 <main+238>: mov -0x24(%ebp),%eax
- 0x08048777 <main+241>: mov %eax,-0x4c(%ebp)
- 0x0804877a <main+244>: mov -0x20(%ebp),%eax
- 0x0804877d <main+247>: mov %eax,-0x48(%ebp)
- 0x08048780 <main+250>: mov -0x1c(%ebp),%eax
- 0x08048783 <main+253>: mov %eax,-0x44(%ebp)
- 0x08048786 <main+256>: mov -0x18(%ebp),%eax
- 0x08048789 <main+259>: mov %eax,-0x40(%ebp)
- 0x0804878c <main+262>: mov -0x14(%ebp),%eax
- 0x0804878f <main+265>: mov %eax,-0x3c(%ebp)
- 0x08048792 <main+268>: mov -0x10(%ebp),%eax
- 0x08048795 <main+271>: mov %eax,-0x38(%ebp)
- 0x08048798 <main+274>: mov -0xc(%ebp),%eax
- 0x0804879b <main+277>: mov %eax,-0x34(%ebp)