State True or False.
i) While overloading operators new operator can be overloaded.
ii) The binary operator such as +, -, * and must explicitly return a value.
A) True, True
B) True, False
C) False, True
D) False, False

1 Answer

Answer :

C) False, True

Related questions

Description : Some of the C++ operators cannot overloaded which are i) Member access operators (. And .*) ii) Conditional operator (? :) iii) Scope resolution operator (: :) iv) Size operator (sizeof) A) only i, ii and iii B) only ii, iii and iv C) only ii and iv D) All i, ii, iii and iv

Last Answer : D) All i, ii, iii and iv

Description : Which of the following differentiates between overloaded functions and overridden functions ? (A) Overloading is a dynamic or runtime binding and overridden is a static or compile time binding. ... function overloading, while redefining a function in a friend class is called function overriding.

Last Answer : (B) Overloading is a static or compile time binding and overriding is dynamic or runtime binding.

Description : Methods can be overloaded with a difference only in the type of the return value .. A) Not supported B) False C) True D) None of the above

Last Answer : B) False

Description : Which of the following operates cannot be overloaded? i) Size of operator (sizeof) ii) Scope resolution Operator iii) Conditional operator (?:) iv) Assignment Operator (=) A) i, ii, iii only B) ii, iii, iv only C) i, iii, iv only D) all i, ii, iii, iv

Last Answer : A) i, ii, iii only

Description : Choose the correct remarks.  (1) C++ allows any operator to be overloaded (2) Some of the existing operators can’t be overloaded (3) Operator precedence can be changed (4) All of these

Last Answer : D

Description : The friend functions are used in situations where A) We want to exchange data between classes B) We want to have access to unrelated classes C) Dynamic binding is required D) We want to create versatile overloaded operators.

Last Answer : A) We want to exchange data between classes

Description : Which of the following operators could be overloaded? A) Size of B) + C) += D) ::

Last Answer : B) +

Description : Which of the following operators cannot be overloaded in C+ + ? (A) * (B) += (C) == (D) ::

Last Answer : (D) ::

Description : Which of the following operators cannot be overloaded in C/C++? (1) Bitwise right shift assignment (2) Address of (3) Indirection (4) Structure reference

Last Answer : Answer: 4

Description : State True or False i) A destructor never takes any argument nor does it return any value. ii) It releases memory space for future use. A) True, True B) True, False C) False, True D) False, False

Last Answer : A) True, True

Description : Select operator is not a unary operator. ii) Project operator chooses subset of attributes or columns of a relation. A) i-True, ii-False B) i-True, ii-True C) i-False, ii-True D) i-False, ii-False

Last Answer : C) i-False, ii-True

Description : A Boolean operator Ө is defined as follows: 1Ө1=1, 1Ө0=0, 0Ө1=0 and 0Ө0=1 What will be the truth value of the expression (xӨy)Өz = xӨ(yӨz)? (A) Always false (B) Always true (C) Sometimes true (D) True when x, y, z are all true

Last Answer : (B) Always true

Description : State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn). A) True, False B) False, True C) False, False D) True, True

Last Answer : D) True, True

Description : State true or false. i) An empty tree is also a binary tree. ii) In strictly binary tree, the outdegree of every node is either o or 2. A) True, False B) False, True C) True, True D) False, False

Last Answer : C) True, True

Description : Which of the following is incorrect in C++ ? (A) When we write overloaded function we must code the function for each usage. (B) When we write function template we code the function only once. (C) It is difficult to debug macros (D) Templates are more efficient than macros

Last Answer : (D) Templates are more efficient than macros 

Description : Which of the following is not a binary operator in relational algebra? A) Join B) Semi-Join C) Assignment D) Project

Last Answer : D) Project

Description : Cartesian product in relational algebra is (A) a Unary operator. (B) a Binary operator. (C) a Ternary operator. (D) not defined.

Last Answer : (B) a Binary operator.

Description : What operators cannot be overloaded?

Last Answer : =, ., ?:, ->, new, is, sizeof, typeof  

Description : Can assignment operators be overloaded directly?

Last Answer : No

Description : In C# which of the operators cannot be overloaded  A) ! B) = C) + D) all of the above

Last Answer : In C# which of the operators cannot be overloaded  B) =

Description : Is a Key startup trigger fires as result of a operator pressing a key explicitly ?

Last Answer : No

Description : Use the concept of operator overloading to overload unary ‘-‘ operator to negate value of variables.

Last Answer : # include <iostream.h> #include<conio.h> class unary { int x, y, z; public: void getdata (int a, int , int c); void display (void); void operator - (); // overload unary minus. }; ... u. display ( ) ; -u; cout<< " u : " ; u. display ( ) ; }

Description : . …………………….. is a form of virus explicitly designed to hide itself from detection by antivirus software. A) Stealth virus B) Polymorphic Virus C) Parasitic Virus D) Macro Virus

Last Answer : A) Stealth virus

Description : Which of the following is true about Java. A) Java does not support overloading. B) Java has replaced the destructor function of C++ C) There are no header files in Java. D) All of the above.

Last Answer : D) All of the above

Description : State true or false. i) Jpanel is a class included in awt package. ii) Anonymous classes are mostly used for event handling. iii) Names of anonymous classes must be unique iv) JOptionPane is an inner class A) i-false ... ) i-false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : State any four rules for operator overloading.

Last Answer : Rules for operator overloading: 1. Only existing operators can be overloaded. New operators cannot be created. 2. The overloaded operator must have at least one operand that is of user defined type. 3. ... * and / must explicitly return a value. They must not attempt to change their own arguments. 

Description : Which of the following statements is correct? (A) Every class containing abstract method must not be declared abstract. (B) Abstract class cannot be directly initiated with ‘new’ operator. (C) Abstract class cannot be initiated. (D) Abstract class contains definition of implementation.

Last Answer : Answer: B,C

Description : …………. Is the process of creating new classes, called derived classes from existing classes called base class. A) Inheritance B) Encapsulation C) Polymorphism D) Overloading

Last Answer : A) Inheritance

Description : Which one of the following is correct for overloaded functions in C++? (1) Compiler sets up a separate function for every definition of function. (2) Compiler does not set up a ... functions cannot handle different types of objects. (4) Overloaded functions cannot have same number of arguments.

Last Answer : Answer: 1

Description : What is function overloading and operator overloading?

Last Answer : Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are ... add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).

Description : Write a program for overloading of ++unary operator for inch to feet conversion. 12 inch = 1 feet.

Last Answer : #include #include class abc { int i,f; public: abc(int f1,int i1) { f=f1; i=i1; } void operator ++() {  while(i>11)  {  f++;  i=i-12;  }  cout

Description : Refer the points as listed below: (a) What are the operator precedence rules ? (b) What are the operator associativity rules ? (c) What is the order of operand evaluation ? (d) Are there restrictions on operand evaluation side effects ? ... (d) (C) (a), (b) and (d) (D) (a), (b), (c) and (d)

Last Answer : (D) (a), (b), (c) and (d)

Description : Consider the following statements: (a) Depth - first search is used to traverse a rooted tree. (b) Pre - order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. (c) Huffman's algorithm is used to find an optimal ... (d) (C) (a) , (b) and (c) (D) (a), (b) , (c) and (d)

Last Answer : (D) (a), (b) , (c) and (d)

Description : Having multiple perceptrons can actually solve the XOR problem satisfactorily: this is because each perceptron can partition off a linear part of the space itself, and they can then combine their results. ... have to be explicitly hand-coded d) False - just having a single perceptron is enough

Last Answer : c) True – perceptrons can do this but are unable to learn to do it – they have to be explicitly hand-coded

Description : What is the difference between function overloading and function overriding?

Last Answer : A: In function overloading only the function name is same but function signature (list of parameters) is different, whereas, in function overriding both the function name as well as function ... is an example of static polymorphism, whereas, function overriding is an example of dynamic polymorphism.

Description : ………… enable us to hide, inside the object, both the data fields and the methods that act on that data. A) Encapsulation B) Polymorphism C) Inheritance D) Overloading

Last Answer : A) Encapsulation

Description : Which of the following correctly describes overloading of functions? (A) Virtual polymorphism (B) Transient polymorphism (C) Ad-hoc polymorphism (D) Pseudo polymorphism

Last Answer : (C) Ad-hoc polymorphism

Description : .................. allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members. (A) Overloading (B) Inheritance (C) Polymorphism (D) Encapsulation 

Last Answer : (B) Inheritance

Description : Match the following a) : : i) Pointer to member declarator b) : :* ii) Pointer to member operator c) ->* iii) Scope resolution operator A) a-ii, b-iii, c-i B) a-iii, b-i, c-ii C) a-i b-ii, c-iii D) a-iii, b-ii, c-i

Last Answer : B) a-iii, b-i, c-ii

Description : What are postfix and prefix operators?

Last Answer : A: Both postfix and prefix operators change (increase or decrease) the value of a variable by 1. In postfix, the old value of the variable is first used and then the variable is updated to the new ... , the value of the variable is first updated to the new value and then this new value is used.

Description : When the operators are having the same priority, they are evaluated from ................. ............. in the order they appear in the expression. A) right to left B) left to right C) any of the order D) depends on compiler

Last Answer : B) left to right

Description : What arithmetic operators cannot be used with strings ? a) + b) * c) – d) All of the mentioned

Last Answer : c) –

Description : Which of the following statements is false? (A) Optimal binary search tree construction can be performed efficiently using dynamic programming. (B) Breadth-first search cannot be used to find connected components of a graph. (C) ... used to find the components of a graph. (1) A (2) B (3) C (4) D 

Last Answer : Answer: 2

Description : Which of the following characteristics of constructor are true. i) They should be declared in the public section. ii) They are invoked automatically when the objects are created. iii) They do not have return type and void also. ... and v C) Only i, iii, iv and v D) All i, ii, iii, iv and v

Last Answer : D) All i, ii, iii, iv and v

Description : What can you say about the following statements? I. XML tags are case-insensitive. II. In JavaScript, identifier names are case-sensitive. III. Cascading Style Sheets (CSS) cannot be used with XML. IV. All well-formed ... IV are false. (3) only I and III are false. (4) only II and IV are false. 

Last Answer : Answer: Marks to all

Description : Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be (A) n/2 - 1 (B) n/2 + 1 (C) (n-1)/2 (D) (n+1)/2

Last Answer : (C) (n-1)/2