Vidyalelo
C++ Programming · Q785

C++ miscellaneous

Programming · C++ Programming · question 785

Q785

What will be the output of the following C++ code? #include using namespace std; template void loopIt(T x) int count = 3; T val[count]; for (int ii=0; ii < count; ii++) val[ii] = x++; cout << val[ii] << endl; ; int main() float xx = 2.1; loopIt(xx);

A.
2.1
B.
3.1
C.
2.1
3.1
4.1
D.
3.2
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board