Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> using namespace std; template <typename T, typename U> void squareAndPrint(T x, U y) { cout << x << x * x << endl; cout << y << " " << y * y << endl; }; int main() { int ii = 2; float jj = 2.1; squareAndPrint<int, float>(ii, jj); }

Select the correct option to test your answer:

More Computer Questions

2-3-4 trees are B-trees of order 4. They are an isometric of . . . . . . . . trees. Which is not a container for embedded content? Which printer uses a combination of laser-beam & electro photographic techniques. What will be the output of the following Python code? x = 'abcd' print(list(map(list, x))) Which two classes use the Shape class correctly? A. public class Circle implements Shape { private int radius; } B. public abstract class Circle extends Shape { private int radius; } C. public class Circle extends Shape { private int radius; public void draw(); } D. public abstract class Circle implements Shape { private int radius; public void draw(); } E. public class Circle extends Shape { private int radius; public void draw() { /* code here */ } } F. public abstract class Circle implements Shape { private int radius; public void draw() { /* code here */ } }