Trắc nghiệm C++

Trắc nghiệm C++

University

13 Qs

quiz-placeholder

Similar activities

C++ Quiz-1

C++ Quiz-1

University

15 Qs

FIND THE KEY

FIND THE KEY

University

10 Qs

FLASH

FLASH

University

10 Qs

UAS Praktikum: Logika dan Algoritma Pemrograman

UAS Praktikum: Logika dan Algoritma Pemrograman

1st Grade - University

10 Qs

JavaScript

JavaScript

University

13 Qs

unit3 pointers

unit3 pointers

University

10 Qs

PPS : Quiz 2

PPS : Quiz 2

University

15 Qs

Operators

Operators

University

12 Qs

Trắc nghiệm C++

Trắc nghiệm C++

Assessment

Quiz

Computers

University

Hard

Created by

Duc Nguyen

Used 1+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <iostream>

int main()

{

int a = 10;

cout<<a;

int a = 20;

cout<<a;

return 0;

}

1020

1010

2020

Lỗi: Redeclaration of a

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int x = 10;

int main(){

int x = 0;

cout<<x;

return 0;

}

10

0

compile error

undefined

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

#include <stdio.h>

int main()

{

int a = 1, b = 1, c;

c = a++ + b;

printf("%d, %d", a, b);

}

a=1, b=1

a=2, b=1

a=1, b=2

a=2, b=2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is it possible to run program without main() function?

yes

no

may be

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The output of the following segment is

int k, n=20;

k=(n>5?(n<=10?100:200):500);

printf("%d",n);

100

200

300

20

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Inside try

Exception Caught

After throw

After catch

Inside try

Exception Caught

After catch

Inside try

Exception Caught

Inside try

After throw

After catch

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

The derived class can not call the base class func().

Must place “using namespace Base” at the top of the file.

Base::d.func();

d.Base::func();

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?