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 separate function for every definition of function. (3) Overloaded functions cannot handle different types of objects. (4) Overloaded functions cannot have same number of arguments.

1 Answer

Answer :

Answer: 1

Related questions

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 : Which of the following is/ are the characteristics of friend function. A) It is not in the scope of the class to which it has been declared as friend. B) It can invoke like a normal function without the help of any object. C) Usually, it has the objects as arguments. D) All of the above.

Last Answer : D) All of the above.

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 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 : 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 : 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 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 satic function can have access to only other static members (functions or variables) declared in the same class. ii) A static member function can be called using the class name (instead of its objects) A) True, True B) True, False C) False, True D) False, False

Last Answer : B) True, False

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 : How will a molded-case circuit breaker react after it has tripped, as a result of an overloaded circuit? A. The breaker will trip again if immediately reset. B. The breaker handle will lock in ... down. D. The breaker handle cannot be moved to the OFF position until the thermal element cools down.

Last Answer : Answer: A

Description : Which of the following cannot be passed to a function? A) Reference variable B) Arrays C) Class objects D) Header files

Last Answer : D) Header files

Description : Consider the following Entity-Relationship (E-R) diagram and three possible relationship sets (I, II and III) for this E-R diagram: If different symbols stand for different values (e.g., t1 is definitely not equal to t2 ... diagram ? (A) I only (B) I and II only (C) II only (D) I, II and III

Last Answer : (A) I only

Description : If A and B are two fuzzy sets with membership functions μA(x) = {0.6, 0.5, 0.1, 0.7, 0.8} μB(x) = {0.9, 0.2, 0.6, 0.8, 0.5} Then the value of μ(A∪B)’(x) will be (A) {0.9, 0.5, 0.6, 0.8, 0.8} (B) {0.6, 0.2, 0.1, 0.7, 0.5} (C) {0.1, 0.5, 0.4, 0.2, 0.2} (D) {0.1, 0.5, 0.4, 0.2, 0.3}

Last Answer : (C) {0.1, 0.5, 0.4, 0.2, 0.2}

Description : If A and B are two fuzzy sets with membership functions µA(X) = {0.2, 0.5, 0.6, 0.1, 0.9} µB(X) = {0.1, 0.5, 0.2, 0.7, 0.8} Then the value of µA∩B will be (A) {0.2, 0.5, 0.6, 0.7, 0.9} (B) {0.2, 0.5, 0.2, 0.1, 0.8} (C) {0.1, 0.5, 0.6, 0.1, 0.8} (D) {0.1, 0.5, 0.2, 0.1, 0.8}

Last Answer : (D) {0.1, 0.5, 0.2, 0.1, 0.8}

Description : Consider the following statements related to compiler construction: I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by ... Only l (2) Only ll (3) Both I and II (4) Neither I nor Il

Last Answer : Answer: 4

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 : 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

Last Answer : C) False, True

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

Last Answer : B) +

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 : .............. predicate calculus allows quantified variables to refer to objects in the domain of discourse and not to predicates or functions. (A) Zero-order (B) First-order (C) Second-order (D) High-order

Last Answer : (B) First-order

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 : Given the following statements :  S1 : The subgraph-isomorphism problem takes two graphs G1 and G2 and asks whether G1 is a subgraph of G2.  S2 : The set-partition problem takes as input a set S of numbers and ... S1 is P problem and S2 is P problem. (D) S1 is P problem and S2 is NP problem.

Last Answer : (B) S1 is NP problem and S2 is NP problem.

Description : Let A and B be sets in a finite universal set U. Given the following: |A - B|, |AÅB|, |A|+|B| and |AÈB| Which of the following is in order of increasing size ? (A) |A - B| ≤ |AÅB| ≤ |A| + |B| ≤ |AÈB| (B) |AÅB| ≤ |A ... |AÅB| ≤ |A| + |B| ≤ |A - B| ≤ |AÈB| (D) |A - B| ≤ |AÅB| ≤ |AÈB| ≤ |A| + |B|

Last Answer : (D) |A – B| ≤ |AÅB| ≤ |AÈB| ≤ |A| + |B|

Description : Which of the following statements concerning Object-Oriented databases is FALSE? (A) Objects in an object-oriented database contain not only data but also methods for processing the data. (B ... Object-oriented databases store more types of data than relational databases and access that data faster.

Last Answer : (C) Object-oriented databases are more adapt at handling structures (analytical) data than relational databases.

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 : ............... package is used by compiler itself. So it does not need to be imported for use. A) java.math B) java.awt C) java.applet D) java.lang

Last Answer : D) java.lang

Description : Ingres is a ........................ A) Socket B) Compiler C) Database D) Web server

Last Answer : C) Database

Description : In the second type the information written in java after // is ignored by the ....................... A) Interpreter B) Compiler C) Programmer D) All of the above

Last Answer : B) Compiler

Description : The compiler converts all operands upto the type of the largest operand is called (A) Type Promotion (B) Type Evaluation (C) Type Conversion (D) Type Declaration

Last Answer : (A) Type Promotion 

Description : Which phase of compiler generates stream of atoms ? (A) Syntax analysis (B) Lexical Analysis (C) Code generation (D) Code optimization 

Last Answer : (A) Syntax analysis

Description : The ............... transfers the executable image of a C++ program from hard disk to main memory. (A) Compiler (B) Linker (C) Debugger (D) Loader

Last Answer : (D) Loader

Description : compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction? (A) Replace P + ... * P or Replace 3 + 4 by 7. (B) Replace P * 32 by P

Last Answer : (B) Replace P * 32 by P

Description : . ………….. function sets the fill pattern and color. A) floodfill () B) setcolor() C) setfillstyle() D) fillstyle ()

Last Answer : C) setfillstyle()

Description : Which of the following arguments are not valid? (a) If Gora gets the job and works hard, then he will be promoted. If Gora gets promotion, then he will be happy. He will not be happy, therefore, either he will not get the job or he ... and (c) (B) (b) and (c) (C) (a), (b) and (c) (D) (a) and (b)

Last Answer : Answer: B Explanation: (a) P: Gora gets the job  Q: Gora works hard  R: Gora gets promotion  S: Gora will be happy The argument can bet written as  (P˄Q)→R  R→S  ¬S ... also be written as: ((P˅Q)˄¬P)→Q where P, and Q are propositions expressed in some formal system.

Description : Can functions be overloaded ?

Last Answer : Yes.

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : What is the output of the following code? >>> a=(2,3,4) >>> sum(a,3) a) Too many arguments for sum() method b) The method sum() doesn’t exist for tuples c) 12 d) 9

Last Answer : c) 12

Description : Which of the following condition is true for an object used as a function argument. i) A copy of the entire objects is passed to the function. ii) Only the address of the object is transferred to the function. A) Only i B) Only ii C) Both i and ii D) None of them

Last Answer : C) Both i and ii

Description : Match the following types of variables with the corresponding programming languages: (a) Static variables (i) Local variables in Pascal (b) Stack dynamic (ii) All variables in APL (c) Explicit heap dynamic (iii) Fortran 77 (d) Implicit ... (ii) (C) (iii) (i) (iv) (ii) (D) (ii) (i) (iii) (iv)

Last Answer : (C) (iii) (i) (iv) (ii) 

Description : A variable is defined within a block in a body of a function. Which of the following are true? A) It is visible throughout the function. B) It is visible from the point of definition to the end ... visible from the point of definition to the end of the block. D) It is visible throughout the block.

Last Answer : D) It is visible throughout the block.

Description : When an array is passed as a parameter to a function which of the following statements is correct? (A) The function can change values in the original array. (B) The function cannot change values in the original array. (C) Results in compilation error. (D) Results in runtime error.

Last Answer : (A) The function can change values in the original array.

Description : When an array is passed as parameter to a function, which of the following statements is correct ? (A) The function can change values in the original array. (B) In C, parameters are passed by value, ... . (D) Results in a run time error when the function tries to access the elements in the array.

Last Answer : (A) The function can change values in the original array.

Description :  Answer the following S. No Statement Chose the correct  answer OR Fill-in-the-blanks 1 Fyrite measures CO2, O2 and SO2 True/False 2 Ultrasonic Flow Meter uses the principle of____& ____ Fill in the ... of RPM  meter is used and for a visible shaft-end _______ type of  RPM meter is used.

Last Answer : Sr  No Statement Chose the correct  answer OR Fill-in-the-blanks Solution 1 Fyrite measures CO2, O2 and  SO2 True/False False 2 Ultrasonic Flow Meter uses the  principle of____& ____ ... ]  10 In a gasification system the  reduction zone is above the  combustion zone True/False False

Description : The adjective first-order distinguishes first-order logic from ___________ in which there are predicates having predicates or functions as arguments, or in which one or both of ... Representational Verification b) Representational Adequacy c) Higher Order Logic d) Inferential Efficiency

Last Answer : c) Higher Order Logic

Description : A thread is usually defined as a light weight process because an Operating System (OS) maintains smaller data structure for a thread than for a process. In relation to this, which of the following ... separate stack for each thread. (D) OS does not maintain virtual memory state for each thread.

Last Answer : (B) OS maintains only CPU registers for each thread.

Description : Let f and g be the functions from the set of integers to the set integers defined by f(x) = 2x + 3 and g(x) = 3x + 2 Then the composition of f and g and g and f is given as (A) 6x + 7, 6x + 11 (B) 6x + 11, 6x + 7 (C) 5x + 5, 5x + 5 (D) None of the above

Last Answer : (A) 6x + 7, 6x + 11 Explanation: fog(x)=f(g(x))=f(3x+2)=2(3x+2)+3=6x+7 gof(x)=g(f(x))=g(2x+3)=3(2x+3)+2=6x+11

Description : State true of false. i) We cannot make the function inline by defining a function outside the class. ii) A member function can be called by using its name inside another member function of the same class, this ... of member function. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True