RSSAmplifier

Victor A · Jun 14, 2024

C++ Test nr.1

0
Sign in to vote or save

victorantos.com

C++ Beginner Test

Time Elapsed: 0 seconds

1. What is the output of the following code?

```cpp #include

using namespace std; int main() { cout << 5 + 3 * 2 << endl; return 0; } ``` a) 16
b) 13
c) 11
d) 10

2. Which keyword is used to define a constant in C++?

a) const
b) define
c) static
d) let

3. How do you declare a function in C++?

a) void myFunction() {}
b) function myFunction() {}
c) def myFunction() {}
d) func myFunction() {}

4. What is the output of the following code?

```cpp #include

using namespace std; int main() { int x = 5; int y = 10; cout << (x == y) << endl; return 0; } ``` a) 1
b) 0
c) x
d) y

Read the original on victorantos.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.