[ create a new paste ] login | about

Link: http://codepad.org/S8mnf51P    [ raw code | output | fork ]

C, pasted on Oct 1:
#include <stdio.h>

int proc2(int num) {
    printf("%d\n", num);
}

int main()
{
    printf("Hello World\n");

    proc2(num);
    num++;
    proc2(num);
    num++;
    proc2(num);
    num++;
    proc2(num);
    num++;
    proc2(num);

    return 0;
}


Output:
1
2
3
4
In function 'main':
Line 11: error: 'num' undeclared (first use in this function)
Line 11: error: (Each undeclared identifier is reported only once
Line 11: error: for each function it appears in.)


Create a new paste based on this one


Comments: