II ECM_Quiz 1

II ECM_Quiz 1

University

15 Qs

quiz-placeholder

Similar activities

Didactics quizz #1

Didactics quizz #1

University

15 Qs

Unity 1 ДЛЯ ВСЕХ

Unity 1 ДЛЯ ВСЕХ

7th Grade - University

10 Qs

C Language 101

C Language 101

University

18 Qs

Python Podstawy

Python Podstawy

University

10 Qs

Arduino Programación - Sistema de Control de Temperatura

Arduino Programación - Sistema de Control de Temperatura

University

13 Qs

Lección 1 Master Programming Java Script

Lección 1 Master Programming Java Script

University

10 Qs

coding beast set 2

coding beast set 2

University

20 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

University

12 Qs

II ECM_Quiz 1

II ECM_Quiz 1

Assessment

Quiz

Education

University

Hard

Created by

MARY T

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to perform operator overloading in C++?

a) overload

b) operator

c) override

d) overloading

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operators cannot be overloaded in C++?

a) =

b) +

c) &

d) *

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of operator overloading in C++?

a) To create new operators

b) To change the behavior of existing operators

c) To increase code complexity

d) To improve program performance

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is not a valid return type for an overloaded operator function?

  1. a) void

  1. b) int

c) float

d) bool

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which operator is used to overload the addition operation in C++?

  1. a) +

  1. b) +=

  1. c) =

  1. d) &

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is the correct syntax to overload the << operator for output?

  1. a) ostream& operator<<(ostream& os, const MyClass& obj)

  1. b) ostream operator<<(ostream os, const MyClass& obj)

  1. c) void operator<<(ostream& os, const MyClass& obj)

  1. d) MyClass& operator<<(ostream& os, const MyClass& obj)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is not a unary operator?

  1. a) +

  1. b) -

  1. c) *

  1. d) /

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?