What happens when you attempt to compile and run the following code?
#include
using namespace std;
template
void f(A &a)
{
cout<<1<}void f(int &a){cout<<2<}int main(){int a = 1;f(a);return 0;} Aprogram displays: 1 Bprogram displays: 2 Ccompilation error Druntime exception Show Suggested Answer Hide Answer Suggested Answer: B
}
void f(int &a)
cout<<2<}int main(){int a = 1;f(a);return 0;} Aprogram displays: 1 Bprogram displays: 2 Ccompilation error Druntime exception Show Suggested Answer Hide Answer Suggested Answer: B
int main()
int a = 1;
f(a);
return 0;
Limited Time Offer
25%
Off
Currently there are no comments in this discussion, be the first to comment!
Currently there are no comments in this discussion, be the first to comment!