All pastes #955211 Raw Edit

Miscellany

public c v1 · immutable
#955211 ·published 2008-03-24 13:19 UTC
rendered paste body
#include <stdio.h>typedef struct {	char tytul[50];	char rodzaj[15];	char typ_danych[15];	int nr; } nosnik;int main() {	nosnik lista[20];	lista[0].tytul[0] = 'a';	lista[0].rodzaj[0] = 'b';	lista[0].typ_danych[0] = 'c';	printf("%s", lista[0].tytul[0]);	return 0;}/*Program received signal SIGSEGV, Segmentation fault.0xb7dfb55b in strlen () from /lib/tls/i686/cmov/libc.so.6(gdb) disas mainDump of assembler code for function main:0x08048374 <main+0>:    lea    0x4(%esp),%ecx0x08048378 <main+4>:    and    $0xfffffff0,%esp0x0804837b <main+7>:    pushl  0xfffffffc(%ecx)0x0804837e <main+10>:   push   %ebp0x0804837f <main+11>:   mov    %esp,%ebp0x08048381 <main+13>:   push   %ecx0x08048382 <main+14>:   sub    $0x6a4,%esp0x08048388 <main+20>:   movb   $0x61,0xfffff96c(%ebp)0x0804838f <main+27>:   movb   $0x62,0xfffff99e(%ebp)0x08048396 <main+34>:   movb   $0x63,0xfffff9ad(%ebp)0x0804839d <main+41>:   movzbl 0xfffff96c(%ebp),%eax0x080483a4 <main+48>:   movsbl %al,%eax0x080483a7 <main+51>:   mov    %eax,0x4(%esp)0x080483ab <main+55>:   movl   $0x804848c,(%esp)0x080483b2 <main+62>:   call   0x80482d8 <printf@plt>0x080483b7 <main+67>:   mov    $0x0,%eax0x080483bc <main+72>:   add    $0x6a4,%esp0x080483c2 <main+78>:   pop    %ecx0x080483c3 <main+79>:   pop    %ebp0x080483c4 <main+80>:   lea    0xfffffffc(%ecx),%esp0x080483c7 <main+83>:   ret    End of assembler dump.*/