Programming Languages NTA UGC NET Question Analysis

Programming Languages NTA UGC NET Question Analysis


Q1➡ | NET December 2022
Consider the following conditional code , which returns a Boolean values
If((x>25) && (y>100))
return ā€˜false’;
else if((x <= 25) && (y<=100))
return ā€˜true’;
else if((x>25) && (y<=100))
return ā€˜false’;
else
return ā€˜true’;
Simplify it by filling in the following blank with a single Boolean expression without changing the behavior of the conditional code.
If (………………..)
return ā€˜true’;
else
return ā€˜false’;
i āž„ X>25
ii āž„ X≤25
iii āž„ Y>100
iv āž„ Y≤100
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q2➡ | NET December 2022
Machine Level Language is a/an
i āž„ Assembly Language
ii āž„ Low Level Language
iii āž„ High Level Language
iv āž„ Translating Language
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q3➡ | NET December 2022
Which of the following is wrong about the data types?
i āž„ The number is always positive when qualifier ā€˜unsigned’ is used.
ii āž„ The number can be positive or negative when the qualifier ā€˜signed’ is used
iii āž„ The range of value for signed data types is more than that of unsigned data types
iv āž„ The left most bit in unsigned data type is used to represent the value
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q4➡ | NET December 2022
If a constructor ā€˜Date’ is declared explicitly and has to be defined outside the class. Which of the following is correct?
i āž„ Date :: Date (int dd) {/*……*/}
ii āž„ Explicit Date :: Date (int dd) {/*…..*/}
iii āž„ Such a constructor cannot be defined
iv āž„ Constructor always has be defined inside the class
Best Explanation:
Answer: (i)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q5➡ |
Let ā€˜n’ denote a positive integer. Suppose a function F is defined as
i āž„ 4, ⌊log2nāŒ‹
ii āž„ 14, ⌊log2nāŒ‹
iii āž„ 4, ⌊n/2āŒ‹
iv āž„ 14, ⌊n/2āŒ‹
Best Explanation:
Answer: (i)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q6➡ | NET December 2022
Which of the following lists define in HTML Share similar elements?
(A) Unordered lists
(B) Ordered List
(C) Definition List
(D) Correlated List
(E) Enumerated lists
Choose the appropriate answer from the options given below:
i āž„ A, B, D only
ii āž„ A, Ā C, E only
iii āž„ A, Ā B, C only
iv āž„ A, C, D only
Best Explanation:
Answer: Mark to All
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q7➡ | NET December 2022
Match List (I) with List (II)
A.	If the implementation of generated or derived classes differ only through a param
eter we have	I.	To use class hierarchy

B.	If the actual types of objects used cannot be known at compile time, then we have	II.	Improved run-time efficiency

C. 	If inline operations are essential and templates are used then we have 	III.	To use templates

D. 	To gain access to differing instances for derived classes through base we have 	IV.	To use explicit casting
Choose the correct answer from the options given below:
i āž„ A-(I), B-(II), C-(IV), D-(III)
ii āž„ A-(III), B-(I), C-(II), D-(IV)
iii āž„ A-(I), B-(III), C-(II), D-(IV)
iv āž„ A-(II), B-(I), C-(III), D-(IV)
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q8➡ | NET December 2022
Match List (I) with List (II)
A.	 Apache Kafka	I.	Platform for constructing data flows for extract, transform, and load (ETL) processing and analysis of large datasets. 
B.	 Pig	II.	General–purpose computing model and runtime system for distributed data analytics.
C. 	 Apache Mahout	III.	Open-Source platform that was created by LinkedIn. 
D. 	 Map reduce	IV.	Open-Source platform used for creating scalable machine learning algorithms.
Choose the correct answer from the options given below:
i āž„ A-(II), B-(IV), C-(I), D-(III)
ii āž„ A-(II), B-(I), C-(IV), D-(III)
iii āž„ A-(III), B-(I), C-(IV), D-(II)
iv āž„ A-(I), B-(II), C-(IV), D-(III)
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q9➡ | NET December 2022
In what sequence the initialization, testing and execution of body is done while using do while loop?
(A) Commenting
(B) Execution of the body
(C) Initialization
(D) Testing the condition
Choose the correct answer from the following:
i āž„ D,B,C
ii āž„ D,C,B
iii āž„ C,A,B
iv āž„ C,B,D
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q10➡ | NET June 2022
Match List (I) with List (II) :
(A)	Localization	(I)	Encapsulation

(B)	Packaging or binding of a collection of item
	(II)	Abstraction
(C)	Mechanism that enables designer to focus on essential details of a program Component. 		(III)	Characteristics of software that indicates the manner in which information is concentrated in program. 

(D)	Information hiding	(IV)	Suppressing the operational details of a
Program component
Choose the correct answer from the options given below:
i āž„ (A)-(I),(B)-(II),(C)-(III),(D)-(IV)
ii āž„ (A)-(II),(B)-(I),(C)-(III),(D)-(IV)
iii āž„ (A)-(III),(B)-(I),(C)-(II),(D)-(IV)
iv āž„ (A)-(III),(B)-(I),(C)-(IV),(D)-(II)
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q11➡ | NET June 2022
pointers cannot be used to
i āž„ Find the address of a variable in memoryĀ Ā Ā Ā Ā Ā Ā Ā Ā 
ii āž„ Reference value directly
iii āž„ Simulate dynamic data structure
iv āž„ Manipulate dynamic data structure
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q12➡ | NET June 2022
The condition num!=65 cannot be replaced by
i āž„ num>65 | | num < 65
ii āž„ !(num = = 65)
iii āž„ num – 65
iv āž„ !(num – 65)
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q13➡ | NET June 2022
Of the following, which is Not a logical error?
i āž„ Using the ‘=’ , instead of ‘==’ to determine if two values are equal
ii āž„ Divide by Zero
iii āž„ Failing to initialize counter and total variables before the body of loop
iv āž„ Using commas instead of two required semicolon in a for loop header
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q14➡ | NET June 2022
Which mechanism in XML allows organizations to specify globally unique names as element tags in documents?
i āž„ Root
ii āž„ Header
iii āž„ Schema
iv āž„ Namespace
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q15➡ | NET June 2022
Which statement is false?
i āž„ All function calls in C pass arguments using call by value
ii āž„ Call by reference enables a called function to modify a variable in calling function
iii āž„ Call by value always more efficient that call by reference
iv āž„ Programmers use pointers and indirection operation to simulate call by references
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q16➡ | NET June 2022
A top down approach to programming calls for :
Statement (I) : Working from the general to the specific
Statement (II) : Postpone the minor decisions
Statement (III) : A systematic approach
Statement (IV) Intermediate coding of the problem
Which of the following is true ?
i āž„ Statement (I) only
ii āž„ Statement (I) and Statement (II) only
iii āž„ Statement (I) , Statement (II) and Statement (III) only
iv āž„ Statement (I) , Statement (II) and Statement (IV) only
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q1➡ |
A member function can always access the data in ……………. ,(in C++).
i āž„ the class of which it is member
ii āž„ the object of which it is a member
iii āž„ the public part of its class
iv āž„ the private part of its class

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q2➡ |
‘*ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++):
i āž„ *(ptrdata++)
ii āž„ (*ptrdata++)
iii āž„ (*ptrdata++)
iv āž„ *(ptrdata)++

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q3➡ |
The associativity of which of the following operators is Left to Right, in C++?
i āž„ Unary Operator
ii āž„ Logical not
iii āž„ Array element access
iv āž„ addressof

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q4➡ |
If a function is friend of a class, which one of the following is wrong?
i āž„ A function can only be declared a friend by a class itself.
ii āž„ Friend functions are not members of a class, they are associated with it.
iii āž„ Friend functions are members of a class.
iv āž„ It can have access to all members of the class, even private ones.

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q5➡ |
Which of the following is not a member of class ?
i āž„ Static function
ii āž„ Friend function
iii āž„ Const function
iv āž„ Virtual function

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q6➡ |
……………… 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.
i āž„ Overloading
ii āž„ Inheritance
iii āž„ Polymorphism
iv āž„ Encapsulation

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q7➡ |
Member of a class specified as …………… are accessible only to method of the class.
i āž„ private
ii āž„ public
iii āž„ protected
iv āž„ derive

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q8➡ |
Match the following:
Set-I
(a) Garbage collection in
(b) Nameless object
(c) Template support
(d) A forward reference
(e) Derived class inherits from base class
Set-II
1- Java
2- generic programming
3- defines a class
4- member function
5- within a statement
Codes :
(a) (b) (c) (d) (e)
i āž„ 1 5 4 2 3
ii āž„ 1 5 2 3 4
iii āž„ 5 1 2 3 4
iv āž„ 5 4 3 1 2

Show Answer With Best Explanation

Answer: I (Marks to all )
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q9➡ |
The data type created by the data abstraction process is called.
i āž„ class
ii āž„ structure
iii āž„ abstract data type
iv āž„ user defined data type

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q10➡ |
Which of the statements are true?
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of derived class.
III. A derived class inherits constructors and destructors.
IV. A friend function can be called like a normal function. V. Nested class is a derived class.
i āž„ I, II, III
ii āž„ II, III, V
iii āž„ III, IV, V
iv āž„ I, II, IV

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q11➡ |
A copy constructor is invoked when:
i āž„ a function returns by value
ii āž„ an argument is passed by value
iii āž„ a function returns by reference
iv āž„ none of the above

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q12➡ |
How many constructors can a class have?
i āž„ zero
ii āž„ 1
iii āž„ 2
iv āž„ any number

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line
Q13➡ |
Which of the following is true?
i āž„ A ā€œstaticā€ member of a class cannot be inherited by its derived class.
ii āž„ A ā€œstaticā€ member of a class can be initialized only within the class it is a member of.
iii āž„ A ā€œstaticā€ member of a class can be initialized before an object of that class is created.
iv āž„ Since ā€œstaticā€ member of a class is actually a global element, it does not require a class/object qualifier to access it independently of class/object.

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q14➡ |
What keyword in class specification helps to hide data:
i āž„ Public
ii āž„ Private
iii āž„ Static
iv āž„ Void

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q15➡ |
Data members and member function of a class by default is respectively:
i āž„ private and public
ii āž„ public
iii āž„ public and private
iv āž„ private

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q16➡ | Match the following with respect to I/O classes in object
oriented programming :
List – I List – II
a. fopen() i. returns end of file
b. fclose() ii. return for any problem report
c. ferror() iii. returns 0
d. feof() iv. returns a file pointer
Codes :
a,b,c,d
i āž„ iv i ii iii
ii āž„ iii i iv ii
iii āž„ ii iii iv i
iv āž„ iv iii i ii

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q17➡ |
Which one of the following is correct, when a class grants friend status to another class?
i āž„ The member functions of the class generating friendship can access the members
of the friend class.
ii āž„ All member functions of the class granted friendship have unrestricted access to
the members of the class granting the friendship.
iii āž„ Class friendship is reciprocal to each other
iv āž„ There is no such concept.

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q18➡ |
When a method in a subclass has the same name and type signatures as a method in the super-class, then the method in the subclass ……………… the method in the super-class.
i āž„ Overloads
ii āž„ Friendships
iii āž„ Inherits
iv āž„ Overrides

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q19➡ |
A …………….. is a special method used to initialize the instance variable of a class.
i āž„ Member function
ii āž„ Destructor
iii āž„ Constructor
iv āž„ Structure

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q20➡ |
Encapsulation is
i āž„ Dynamic binding
ii āž„ A mechanism to associate the code and data.
iii āž„ Data abstraction
iv āž„ Creating new class

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q21➡ |
Assume that we have constructor function for both Base and Derived classes. Now consider the declaration :
main ( )
Base *p = new Derived;
In what sequence, the constructor will be executed?
i āž„ Derived class constructor is followed by Base class constructor.
ii āž„ Base class constructor is followed by Derived class constructor.
iii āž„ Base class constructor is never called.
iv āž„ Derived class constructor is never called.

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q22➡ |
Match the following interfaces of Java. Servlet package :
List – I
a. Servlet Config
b. Servlet Context
c. Servlet Request
d. Servlet Response
List – II
i. Enables Servlets to log events
ii. Read data from a client
iii. Write data to a client
iv. To get initialization parameters
Codes :
a b c d
i āž„ ii iv ii i
ii āž„ iii ii iv i
iii āž„ ii iii iv i
iv āž„ iv i ii iii

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q23➡ |
The pure object oriented programming language with extensive metadata available and modifiable at run time is
i āž„ Small talk
ii āž„ C++
iii āž„ Java
iv āž„ Eiffel

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q24➡ |
Which method is called first by an applet program ?
i āž„ start( )
ii āž„ run( )
iii āž„ init( )
iv āž„ begin( )

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q25➡ |
What is true about UML stereotypes ?
i āž„ Stereotype is used for extending the UML language.
ii āž„ Stereotyped class must be abstract
iii āž„ The stereotype indicates that the UML element cannot be changed
iv āž„ UML profiles can be stereotyped for backward compatibility

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q26➡ |
Converting a primitive type data into its corresponding wrapper class object instance is called
i āž„ Boxing
ii āž„ Wrapping
iii āž„ Instantiation
iv āž„ Autoboxing

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q27➡ |
Which one of the following is correct?
i āž„ Java applets cannot be written in any programming language
ii āž„ An applet is not a small program.
iii āž„ An applet can be run on its own.
iv āž„ Applets are embedded in another applications.

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q28➡ |
In Java, when we implement an interface method, it must be declared as:
i āž„ Private
ii āž„ Protected
iii āž„ Public
iv āž„ Friend

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q29➡ |
Which of the following is/are correct with reference to Abstract class and interface ?
(a) A class can inherit only one Abstract class but may inherit several interfaces.
(b) An Abstract class can provide complete and default code but an interface has no code.
Codes :
i āž„ a) is true
ii āž„ (b) is true
iii āž„ Both (a) and (b) are true
iv āž„ Neither (a) nor (b) is true

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q30➡ |
Match the following with reference to object oriented
modelling :
List – I List – II
(a) Polymorphism (i) Picking both operator and attributes with operations appropriate to model an object
(b) Inheritance (ii) Hiding implementation details of methods from users of objects
(c) Encapsulation (iii) Using similar operations to do similar things
(d) Abstraction (iv) Create new classes from existing class
Codes :
(a) (b) (c) (d)
i āž„ iv) (iii) (i) (ii)
ii āž„ (iii) (iv) (i) (ii)
iii āž„ (iii) (i) (ii) (iv)
iv āž„ iv) (iii) (ii) (i)

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q31➡ |
Which of the following is used to make an Abstract class ?
i āž„ Making atleast one member function as pure virtual function
ii āž„ Making atleast one member function as virtual function
iii āž„ Declaring as Abstract class using virtual keyword
iv āž„ Declaring as Abstract class using static keyword

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q32➡ |
When one object reference variable is assigned to another object reference variable then
i āž„ a copy of the object is created.
ii āž„ a copy of the reference is created.
iii āž„ a copy of the reference is not created.
iv āž„ it is illegal to assign one object reference variable to another object reference variable.

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q33➡ |
Which of the following statements is correct?
i āž„ Every class containing abstract method must not be declared abstract.
ii āž„ Abstract class cannot be directly initiated with ā€˜new’ operator.
iii āž„ Abstract class cannot be initiated.
iv āž„ Abstract class contains definition of implementation.

Show Answer With Best Explanation

Answer: II,III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q34➡ |
Which of the following statements is correct?
i āž„ Aggregation is a strong type of association between two classes with full ownership.
ii āž„ Aggregation is a strong type of association between two classes with partial ownership.
iii āž„ Aggregation is a weak type of association between two classes with partial ownership.
iv āž„ Aggregation is a weak type of association between two classes with full ownership.

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q35➡ |
It is possible to define a class within a class termed as nested class. There are ………… types of nested classes.
i āž„ 2
ii āž„ 3
iii āž„ 4
iv āž„ 5

Show Answer With Best Explanation

Answer: I,III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q36➡ |
Implicit return type of a class constructor is:
i āž„ not of class type itself
ii āž„ class type itself
iii āž„ a destructor of class type
iv āž„ destructor not of class type

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q37➡ |
Which of the following is not a correct statement?
i āž„ Every class containing abstract method must be declared abstract.
ii āž„ Abstract class can directly be initiated with ā€˜new’ operator.
iii āž„ Abstract class can be initiated.
iv āž„ Abstract class does not contain any definition of implementation.

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q38➡ |
Constructors have …………. return type.
i āž„ void
ii āž„ char
iii āž„ int
iv āž„ no

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q39➡ |
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 to be inherited by other classes.
i āž„ Only l
ii āž„ Only II
iii āž„ Neither I nor II
iv āž„ Both l and II

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q40➡ |
Consider the following JAVA program:
public class First
{
public static int CBSE(int x)
{
if (x < 100) x = CBSE (x +10);
return (x – 1);
}
public static void main(String[] args)
{
System.out.print(First.CBSE(60));
}
}
What does this program print?
i āž„ 59
ii āž„ 95
iii āž„ 69
iv āž„ 99

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q41➡ |
i āž„ 20:20
ii āž„ 18:18
iii āž„ 18:20
iv āž„ 20:18

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q42➡ |
The goal of operator overloading is
i āž„ to help the user of a class
ii āž„ to help the developer of a class
iii āž„ to help define friend function
iv āž„ None of the above

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q43➡ |
A friend function can be used to
i āž„ avoid arguments between classes.
ii āž„ allow access to classes whose source code is unavailable
iii āž„ allow one class to access an unrelated class.
iv āž„ None of the above

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q44➡ |
A function object:
i āž„ is an instance of a class for which operator () is a member function.
ii āž„ is an instance of a class for which operator → is a member function.
iii āž„ is a pointer to any function
iv āž„ is a member function of a class

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q44➡ |
If a data-item is declared as a protected access specifier then it can be accessed:
i āž„ Anywhere in the program
ii āž„ By the base and derived classes
iii āž„ Only by base class
iv āž„ Only by derived class

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q45➡ |
Runtime polymorphism can be achieved by:
i āž„ Accessing virtual function through the pointer of the base class
ii āž„ Accessing virtual function through the object
iii āž„ The derived class
iv āž„ None of these

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q46➡ |
The friend functions are used in situations where:
i āž„ We want to have access to unrelated classes
ii āž„ Dynamic binding is required
iii āž„ Exchange of data between classes to take place
iv āž„ None of the above

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q47➡ |
Encapsulation is
i āž„ Dynamic binding
ii āž„ A mechanism to associate the code and data.
iii āž„ Data abstraction
iv āž„ Creating new class

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q48➡ |
A …………….. is a special method used to initialize the instance variable of a class.
i āž„ Member function
ii āž„ Destructor
iii āž„ Constructor
iv āž„ Structure

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q49➡ |
When a method in a subclass has the same name and typesignatures as a method in the superclass, then the method in the subclass……………… the method in the superclass.

i āž„ Overloads
ii āž„ Friendships
iii āž„ Inherits
iv āž„ Overrides

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q50➡ |
Which one of the following is correct, when a class grants friend status to another class?
i āž„ The member functions of the class generating friendship can access the members of the friend class.
ii āž„ All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
iii āž„ Class friendship is reciprocal to each other
iv āž„ There is no such concept.

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?