Minh Phượng
New member
What will be the output of the following C++ code?
A. 2
B. 20
C. 21
D. 22
Code:
#include <iostream>
using namespace std;
void func(int x)
{
cout << x ;
}
int main()
{
void (*n)(int);
n = &func;
(*n)( 2 );
n( 2 );
return 0;
}
B. 20
C. 21
D. 22