[ create a new paste ] login | about

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

C, pasted on Jan 21:
1
2
3
4
5
6
7
8
9
10
11
void foo(const char* string, const char** array) {
    string = "Fooo";
    array[0]= "bar";
}

int main() {
    char* string = "hello";
    char** array = malloc(sizeof(char*) * 4);;
    foo(string, array);
    return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: