Quiz on C++ Basics
Test your knowledge of C++ basics.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What is displayed after the following program executes if the user inputs 2
and 5
, respectively?
#include <iostream> #include <string> using namespace std; int main() { string a, b; cin >> a; cin >> b; cout << a + b << endl; return 0; }
A.
It shows (2+5)
as a string.
B.
It shows 7
as a number.
C.
It shows 25
as a string.
D.
It shows 2+5
as a string.
1 / 10