#include <iostream> void foo(int a[40]); int main(){ int x = 42; foo(&x);} void foo(int *a){ std::cout << a[0] << std::endl;}
Standard input is empty
42
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!