1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int main() { int buf[1000]; buf[0] = 1234; //populate buf foo(buf);//is this correct? Can we pass buf as a pointer that foo expects? } void foo(void*ptr) { printf("%s","Hello from foo\n"); }
1
Hello from foo