All pastes #1869048 Raw Edit

Anonymous

public c v1 · immutable
#1869048 ·published 2010-04-20 04:33 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>int main(){        char *a = malloc(5*sizeof(char));        a = "Hello\0";        printf("a: %s\n", a);                char *b = malloc(20*sizeof(char));        b = "Goodbye\0";        char *c = malloc(2*sizeof(char));        c = "M\0";        char *y = malloc(50*sizeof(char));        y = "abcdefghijklmnopqrstuvwxyz\0";        printf("a: %s\n", a);        printf("y: %s\n", y);        free(a);        free(b);        free(c);        free(y);        return 0;}