[ create a new paste ] login | about

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

C, pasted on Mar 15:
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");
  
}


Output:
1
Hello from foo


Create a new paste based on this one


Comments: