Search Header Logo

Modern cpp quiz 1

Authored by Pawel Krysiak

Other

University

Used 8+ times

Modern cpp quiz 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

Przekazujemy pusty wskaźnik do funkcji bar:

bar(nullptr);

Która z jej przeciążonych wersji zostanie wywołana?

a

b

c

kompilator zgłosi błąd, b i c są równie dobrym dopasowaniem

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Czy kod na obrazku kompiluje się?

Tak

Nie

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Czy kod na obrazku kompiluje się?

Tak

Nie

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Czy kod na obrazku kompiluje się?

Tak

Nie

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Czy powyższy kod jest poprawny?

Tak

Nie

Answer explanation

Dla enum class nie następuje implicit konwersja. Możliwe byłoby jawne rzutowanie:

int one = static_cast<int>(Enum::One);

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

Dla powyższego kodu prawdziwe jest:

x jest typu int

cx jest typu const int

crx jest typu const int&

t jest typu int

Answer explanation

t jest typu int*

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?