Using which keyword we can access value of the instance variables and class variables of that class  inside the method of that class itself.
A) super
B) final
C) this
D) either super or this

1 Answer

Answer :

C) this

Related questions

Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true

Last Answer : B) i-false, ii-true

Description : Can static method access instance variables ?

Last Answer : Ans. Though Static methods cannot access the instance variables directly, They can access them using instance handler.

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 : What is the use of final keyword?

Last Answer : A: Final can be used in three scenarios: a) final before a variable makes it a constant. b) final before a function declaration prevents it from being overridden. c) final before a class declaration prevents it from being inherited.

Description : Which of the following is used to make an Abstract class ? (A) Making atleast one member function as pure virtual function (B) Making atleast one member function as virtual function (C) Declaring as Abstract class using virtual keyword (D) Declaring as Abstract class using static keyword

Last Answer : (A) Making atleast one member function as pure virtual function

Description : What is super keyword?

Last Answer : A: It is a keyword which is used to access the data members and methods of the super class from within the sub class.

Description : ………..defines the structure of a relation which consists of a fixed set of attribute-domain pairs. A) Instance B) Schema c) Program D) Super Key

Last Answer : B) Schema

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 will be the instance of the class datalog knowledge bases? a) Variables b) No function symbols c) First-order definite clauses d) None of the mentioned

Last Answer : b) No function symbols

Description : There are three processes P1, P2 and P3 sharing a semaphore for synchronising a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... The final value of semaphore will be: (1) 0 (2) 1 (3) -1 (4) -2 

Last Answer : Answer: 1

Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true

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

Description : In C++, the keyword void was used ……….. A) To specify the return type of function when it is not returning any value. B) To indicate an empty argument list to a function. C) To declare the generic pointers. D) All of the above.

Last Answer : D) All of the above.

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

Description : What is the use of ‘this’ keyword?

Last Answer : A: It is used to refer to the current object (the object which calls the function).

Description : What is the use of ‘new’ keyword?

Last Answer : A: It is used for dynamic memory allocation to reference data types.

Description : What is the use of return keyword?

Last Answer : A: return keyword is used to return any value from a function. It denotes the end of a function.

Description : Which keyword is used to raise an exception?

Last Answer : A: throw keyword.

Description : Process is ........................ A) A program in execution B) An instance of a program running on a computer. C) The entity that can be assigned to and executed D) All of the above.

Last Answer : D) All of the above.

Description : An instance of a relation is a time varying set of …………………. A) Tuples B) Rows C) Both of them D) None of them

Last Answer : C) Both of them

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 : 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 : Implicit return type of a class constructor is: (A) not of class type itself (B) class type itself (B) a destructor of class type (D) a destructor not of class type 

Last Answer : (B) class type itself

Description : For a program of k variables, boundary value analysis yields .............. test cases. (A) 4k – 1 (B) 4k (C) 4k + 1 (D) 2k – 1

Last Answer : (C) 4k + 1

Description : Which of the following keywords are used to control access to a class member? A) default B) break C) protected D) goto

Last Answer : C) protected

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 : HSAM stands for ………. A) Hierarchic Sequential Access Method B) Hierarchic Standard Access Method C) Hierarchic Sequential and Method D) Hierarchic Standard and Method

Last Answer : A) Hierarchic Sequential Access Method

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

Last Answer : C) initial

Description : Give the stages of instance startup to a usable state where normal users may access it.

Last Answer : STARTUP NOMOUNT - Instance startup STARTUP MOUNT - The database is mounted STARTUP OPEN - The database is opened

Description : Point out the correct statement. a) A client can request access to a cloud service from any location b) A cloud has multiple application instances and directs requests to an instance based on ... a set of virtual machines with each machine being assigned a workload d) All of the mentioned

Last Answer : All of the mentioned

Description : Point out the correct statement. a) A client can request access to a cloud service from any location b) A cloud has multiple application instances and directs requests to an instance based on ... a set of virtual machines with each machine being assigned a workload d) All of the mentioned

Last Answer : All of the mentioned

Description : Point out the correct statement. a) A client can request access to a cloud service from any location b) A cloud has multiple application instances and directs requests to an instance based on ... a set of virtual machines with each machine being assigned a workload d) All of the mentioned

Last Answer : All of the mentioned

Description : Point out the correct statement. a) A client can request access to a cloud service from any location b) A cloud has multiple application instances and directs requests to an instance based on ... a set of virtual machines with each machine being assigned a workload d) All of the mentioned

Last Answer : All of the mentioned

Description : In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. . A) pre increment B) post increment C) incrementation D) pre incrementation

Last Answer : A) pre increment

Description : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

Description : If m and n are int type variables, what will be the result of the expression m% n when m=5 and n=2 ? A) 0 B) 1 C) 2 D) None of the above

Last Answer : B) 1

Description : …………. Refer to the names of variables, functions, arrays, classes etc. created by the programmer. A) Keywords B) Identifiers C) Constraints D) Strings

Last Answer : B) Identifiers

Description : A structure brings together a group of A) items of the same data type B) related data items and variables C) integers with user defined names D) floating points with user defined names

Last Answer : B) related data items and variables

Description : Which of the following is FALSE in C? A) Keywords can be used as variable names B) Variable names can contain a digit C) Variable names do not contain a blank space D) Capital letters can be used in variables

Last Answer : A) Keywords can be used as variable names

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 one of the following describes the syntax of prolog program ? I. Rules and facts are terminated by full stop (.) II. Rules and facts are terminated by semicolon (;) III. Variables names must start with upper case alphabets. ... alphabets. Codes : (A) I, II (B) III, IV (C) I, III (D) II, IV

Last Answer : (C) I, III

Description : Let Pi and Pj be two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processes Pi and Pj, which of the following conditions is not true? (A) R(Pi)∩W(Pj)=Φ (B) W(Pi)∩R(Pj)=Φ (C) R(Pi)∩R(Pj)=Φ (D) W(Pi)∩W(Pj)=Φ

Last Answer : (C) R(Pi)∩R(Pj)=Φ 

Description : In constraint satisfaction problem, constraints can be stated as . (A) Arithmatic equations and inequalities that bind the values of variables (B) Arithmatic equations and inequalities ... impose restrictions over variables (D) Arithmatic equations that discard constraints over the given variables

Last Answer : (A) Arithmatic equations and inequalities that bind the values of variables

Description : A horn clause is ...................... (A) A clause in which no variables occur in the expression (B) A clause that has at least one negative literal (C) A disjunction of a number of literals (D) A clause that has at most one positive literal

Last Answer : (D) A clause that has at most one positive literal 

Description : Let P(m,n) be the statement m divides n where the Universe of discourse for both the variables is the set of positive integers. Determine the truth values of the following propositions. (a) ∃m ∀n P(m,n) (b) ∀n P(1,n) ( ... -False (C) (a)-False; (b)-False; (c)-False (D) (a)-True; (b)-True; (c)-True

Last Answer : Answer: A

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 : In Artificial Intelligence (AI), what is present in the planning graph? (1) Sequence of levels (2) Literals (3) Variables (4) Heuristic estimates

Last Answer : Sequence of levels