What would the following program print out? (Answer without using a computer.)
1 void f( const int a = 5)
2 {
3 std :: cout << a*2 << " \ n";
4 }
5
6 int a = 123;
7 int main ()
8 {
9 f (1) ;
10 f (a ) ;
11 int b = 3;
12 f (b ) ;
13 int a = 4;
14 f (a ) ;
15 f();
16 }
The following program will print out an error. The cout in the line is not a member of the std.
Comments
Leave a comment