What happens when you attempt to compile and run the following code?
#include
using namespace std;
template
void g(int a)
{
cout<}templatevoid g(A a){cout<}int main(){int a = 1;g(a);return 0;} Aprogram displays: 1 Bprogram displays: 2 Ccompilation error Druntime exception Show Suggested Answer Hide Answer Suggested Answer: B
}
void g(A a)
cout<}int main(){int a = 1;g(a);return 0;} Aprogram displays: 1 Bprogram displays: 2 Ccompilation error Druntime exception Show Suggested Answer Hide Answer
int main()
int a = 1;
g(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!