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.

1 Answer

Answer :

D) All of the above.

Related questions

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 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 : If a function is friend of a class, which one of the following is wrong ? (A) A function can only be declared a friend by a class itself. (B) Friend functions are not members of a class, they are ... are members of a class. (D) It can have access to all members of the class, even private ones.

Last Answer : (C) Friend functions are members of a class.

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 : 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 : 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 : In Java, when we implement an interface method, it must be declared as: (A) Private (B) Protected (C) Public (D) Friend

Last Answer : (C) Public

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 : 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 : Automatic initialization of object is carried out using a special member function called ………… A) Friend B) Casting C) Reference Parameter D) Constructor

Last Answer : D) Constructor

Description : The “part-whole”, or “a-part-of”, relationship in which objects representing the components of something associated with an object representing the entire assembly is called as (A) Association (B) Aggregation (C) Encapsulation (D) Generalisation

Last Answer : (B) Aggregation

Description : Superficially the term object-oriented , means that, we organize software as a (A) collection of continuous objects that incorporates both data structure and behaviour. (B) collection of ... and behaviour. (D) collection of objects that incorporates both discrete data structure and behaviour.

Last Answer : (C) collection of discrete objects that incorporates both data structure and behaviour.

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 : An ordinal scale is used to rank order people, objects, or characteristics. a. True b. False

Last Answer : a. True

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 not a member of class ? (A) Static function (B) Friend function (C) Const function (D) Virtual function

Last Answer : (B) Friend function

Description : Which of the following statement(s) with regard to an abstract class in JAVA is/are TRUE? I. An abstract class is one that is not used to create objects. II. An abstract class is designed only to act as a base class ... by other classes. (1) Only l (2) Only II (3) Neither I nor II (4) Both l and II

Last Answer : Both l and II

Description : An actor in an animation is a small program invoked ............... per frame to determine the characteristics of some object in the animation. (A) once (B) twice (C) 30 times (D) 60 times

Last Answer : (A) once

Description : Which of the following provides the best description of an entity type? (A) A specific concrete object with a defined set of processes (e.g. Jatin with diabetes) (B) A value given to a ... template for a group of things with the same set of characteristics that may exist in the real world

Last Answer : Answer: D

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 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 : Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket API a. listen, accept, bind recv b. bind, listen, accept, recv c. bind, accept, listen, recv d. accept, listen, bind, recv

Last Answer : b. bind, listen, accept, recv

Description : How do we invoke a constructor function?

Last Answer : A constructor is invoked automatically when an object of its class is created. Example: class ABC { public: ABC( ) { } }; void main( ) { ABC obj; } In the above example, creating „obj‟ object automatically invokes constructor ‟ABC ( )‟.

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 : 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 : Statement of scope and objectives, opportunities and performance criteria …………. A) Problem definition B) System analysis C) System Design D) Documentation

Last Answer : A) Problem definition

Description : Which of the following is false for the programming language PROLOG? (A) A PROLOG variable can only be assigned to a value once (B) PROLOG is a Strongly Typed Language. (C) The scope of a variable in PROLOG is a single clause or rule. (D) the scope of a variable in PROLOG is a Single Query

Last Answer : (B) PROLOG is a Strongly Typed Language.

Description : If a variable is declared final, it must include ...................... value. A) integer B) no C) initial D) float

Last Answer : C) initial

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : ...................... of a remotely accessible object must implement ................ A) all methods, RemoteException B) class, RemoteException C) class, RemoteInterface D) all methods, RemoteInterface

Last Answer : C) class, RemoteInterface

Description : The out object is an object encapsulated inside the ................. class, and represents the standard output device. A) standard B) local C) globlal D) system

Last Answer : D) system

Description : All java classes are derived from A) java.lang.Class B) java.util.Name C) java.lang.Object D) java.awt.Window

Last Answer : D) java.awt.Window

Description : A ……………. takes a reference to an object of the same class as itself as an argument. A) Reference constructor B) Copy Constructor C) Self Constructor

Last Answer : B) Copy Constructor

Description : A ………………. Is a class whose instances themselves are classes. A) Subclass B) Abstract Class C) Meta Class D) Object Class

Last Answer : C) Meta Class

Description : Which of the following is true about the static member variable in C++. i) It is initialized to zero when the first object of its class is created. Other initialization is also permitted. ii) It is visible only within ... , ii-True B) ii-False, ii-True C) i-True, ii-False D) i-False, iii-False

Last Answer : B) ii-False, ii-True

Description : Pick up the correct statement from the following: (A) Topology describes the geometric characteristic of objects which do not change under transformations and are independent of any coordinate system ... The three elements of topology are adjacency, containment, and connectivity (D) All of these

Last Answer : Answer: Option D

Description : Which one of the following is correct, when a class grants friend status to another class? (A) The member functions of the class generating friendship can access the members of the friend class. (B) ... the friendship. (C) Class friendship is reciprocal to each other (D) There is no such concept.

Last Answer : All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship. 

Description : Which of these characteristics are used to determine the scope of a project? a. Only performance. b. Only context. c. Information objectives, function, performance d. None of the above.

Last Answer : c. Information objectives, function, performance

Description : Which of the following statement(s) regarding a linker software is/are true? I. A function of a linker is to combine several object modules into a single load module. II. A function of a linker is to replace absolute ... modules. (1) Only I (2) Only II (3) Both I and II (4) Neither I nor Il

Last Answer : Answer: 1

Description : Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two statements? I. Abstraction allows us to focus on what something ... and II are correct. (3) Only II is correct. (4) Only I is correct.

Last Answer : (1) Neither I nor II is correct.

Description : Which of the following comments about object oriented design of software, is not true ? Objects inherit the properties of class Classes are defined based on the attributes of objects an object can belong to two classes classes are always different

Last Answer : an object can belong to two classes

Description : Which one among the following is incorrect about 'class': a) A class is simply a representation of the type of object. b) It is blueprint or plan or template that describes the details of an object. ... of three things - a name, attributes and operations d) All of the above e) None of These

Last Answer : e) None of These

Description : Which among the following definitions are correct: a) Object - Any entity that has state and behavior is known as an object. b) Class - Collection of objects is called class. It is logical entity. c) ... re-usability and is used to achieve run time polymorphism. d) All of the above e) None of These

Last Answer : d) All of the above

Description : Consider the fractional knapsack instance n = 4, (p1, p2, p3, p4) = (10, 10, 12, 18), (w1, w2, w3, w4) = (2, 4, 6, 9) and M = 15. The maximum profit is given by (Assume p and w denotes profit and weight of objects respectively) (A) 40 (B) 38 (C) 32 (D) 30

Last Answer : (B) 38

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 : WOW32 is a: (A) Win 32 API library for creating processes and threads. (B) Special kind of file system to the NT name space. (C) Kernel - mode objects accessible through Win32 API (D) Special execution environment used to run 16 bit Windows applications on 32 - bit machines.

Last Answer : (D) Special execution environment used to run 16 bit Windows applications on 32 - bit machines.

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 : Project Scope: 1. is of concern only at the start of the project  2. is mainly a problem to be handled by the change control procedures during the project  execution phase.  3. Should ... . is usually not a problem after the contract or other document authorizing the project has been  approved.

Last Answer : 3. Should be managed and controlled from the project concept through close-out