Marco’s hideout

tech, mountainbiking, cyclocross, politics, tattoos, photography, 8-bit computers and more

Posts for Tag: dennis ritchie

R.I.P. Dennis Ritchie, a little tribute in C..

Farewell, Dennis Ritchie.

#include<stdio.h>

int *Dennis_Ritchie();

void main(){
    int *life;
    life=Dennis_Ritchie();

    fflush(stdin);
    printf("%d",*life);
}

int * Dennis_Ritchie(){

    int age=70;
    ++age;
    return &age;
}

(FYI: Dangling pointer in C)