Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following is used to identify the copy constructor class type X?(i) (X&)  (ii) X(&X)  (iii) X(X&)   (iv) X(X)Justify your answer.

Answer»

X(X&) is used to identify the copy constructor class type X as copy constructor is a constructor of the form classname (classame &).

2.

Differentiate between a default constructor and copy constructor, giving suitable examples of each.

Answer»
Default ConstructorCopy Constructor
A constructor that accepts no parameter is called the default constructorA constructor that initializes a object with the data values of another object is called copy constructor.
A default constructor takes no parameter.Copy constructor takes one parameter of its class& type.
Example:
class Defal
{
public: Defal()
{
cout<<" Default constructor"; }
};
Example:
class A { int i;
public:
 A(int a) //constructor { i=a;
}
A(A &s)//copy constructor
{ i=s.i; }
};
3.

Define a class TravelPlan in C++ with the following descriptions:Private Members:PlanCode           of type longPlace  of type character array (string)Number_of_travellers  of type integer  Number_of_buses                       of type integer Public Members:A constructor to assign initial values of PlanCode as 1001, place as "Agra", Number_of_travellers as 5, Number_of_buses as 1A functio NewPlan() which allows user to enter PlanCode, Plan ad Number_of_travellers. Also, assign the value of Number_of_buses as per the following conditions:Number_of_travellers     Number_of_busesLess than 20    1Equal to or more than 2and less than 402Equal to 40 or more than 40  3A function ShowPlan() to display the content of all the data members on screen.

Answer»

class Travel Plan

 long PlanCode;

char *Place;

int Number_of_travellers;

int Number_of_buses;

public: TravelPlan()

{

PlanCode=1001;

strcpy(Place,"Agra");

Number_of_travellers=5;

Number_of_buses=1;

}

void NewPlan()

{

cout<<"Enter Travel code, Place and Number of travellers \n";

cin>>PlanCode;

gets(Place);

cin>>Number_of_travellers;

if(Number_of_travellers<20)

Number_of_buses=1;

else if(Number_of_travellers<40)

Number_of_buses=2;

else

Number_of_buses=3;

}

void ShowPlan()

{

cout<<"Plan Code:"<<PlanCode<<endl;

cout<<"Place:"<<Place<<endl;

cout<<"Number of travellers:"<<Number_of_travellers<<endl;

cout<<"Number of buses:"<<Number_of_buses<<endl;

}

};

4.

One who writes program is called .............

Answer»

One who writes program is called Programmer.

5.

What do you understand by data independence?

Answer»

Data independence allows modification of a scheme definition in one level without affecting a scheme definition in the next higher level.

6.

The process of writing program is called ...........

Answer»

programming or coding.

7.

What are the three levels of data abstraction?

Answer»

a. Internal Level

b. Conceptual Level

c. External Level (View Level)

8.

What is meant by “data independence”? Make a list of data independence capabilities.

Answer»

Data independence is the ability to modify a scheme definition in one level without affecting a scheme definition in a higher level.

data independence capabilities : 

  • Physical Data Independence has ability to modify the scheme followed at the physical level without affecting the scheme followed at the conceptual level.
  • Logical Data Independence has ability to modify the conceptual scheme without causing any changes in the schemes followed at view levels
9.

________ him go out if he wants to. A) Allow B) Leave C) Let D) Permit

Answer»

Correct option is C) Let

10.

The code of ethics of the teacher permit him to1. Tutor for pay a pupil in his class2. Participate in politics outside the classroom3. Apply for a job before its vacancy is announced4. Discuss confidential matters as he sees fit

Answer» Correct Answer - Option 1 : Tutor for pay a pupil in his class

A professional code of ethics is a guiding principle aimed to assist professionals to conduct work with commitment, dedication, sincerity, honesty, and integrity.

  • Professionals should follow the specific principles of their profession and do their duties as per the requirements of the profession.
  • Professional ethics deals with the principles and values that the professional should implement to create a conducive atmosphere in the workplace.
  • They should also emphasize proving freedom to all the students so that they can express their problems, feeling, and emotions without any fear.
  • The professional code of ethics for teachers is purposely designed to protect the rights of all students. It becomes crucial and important for teachers to understand their work ethics and values before entering the teaching profession. As a teacher, they have a huge role to play in the entire teaching-learning process.

According to the professional code of ethics for teachers, a teacher should be not considered private gains o personal interest.

  • A teacher must make all the policies equal for all. He/She should not be biased.
  • A teacher's job is to provide quality education to all students. A professional code of ethics must address this fact, stating that teachers must not show favouritism or discriminate against students.
  • The teacher should tutor to pay a pupil in his class.
  • The teacher should have a cordial relationship with his/her colleagues.
  • Teachers also must interact with students appropriately, not taking advantage of students in any way, bullying students, or putting them down.
  • Teachers should always stay away from the conflict between their professional work and private interests because it could plausibly be crash unenthusiastically on pupils/students. It could demoralize the students and affects their perception of school and teachers.
  • The teachers should not be biased while imparting and evaluating the student's performance related to academic and co-curricular activities. They must respect all the students and treat them uniformly irrespective of caste, creed, gender, civil status, family status, sexual orientation, religion, age, disability, race, ethnicity, region, community, and socioeconomic status. 
  • Teachers should respect the privacy of other members of their own school and maintain the confidentiality of information gained in the course of professional practice unless a legal imperative requires disclosure or there is a legitimate concern for the wellbeing of an individual.

Thus from the above-mentioned points, it is clear that the code of ethics of the teacher permits him to tutor for pay a pupil in his class.

11.

Write the differences between impact and Non-Impact?

Answer»

The differences between impact and Non-Impact printers are:

Impact printerNon-impact printer
Produces text and images when tiny wire pins on print head strike the ink ribbon by physically contacting the paperProduces text and graphics on paper without actually striking the paper
Low printing speedReasonably fast
Print quality lower in some typesHigh quality of output, capable of printing fine and smooth details
Uses ink ribbonUse ink spray or toner powder
Less expensiveMore expensive

12.

Differentiate Interpreter and Compiler.

Answer»

The differences between interpreter and compiler are:

Interpretercompiler
Translates Program line by lineTranslates a whole program
Remains in RAM After translationLeaves RAM after translation.
Suitable for small translationsSuitable for long computation.
Slower access Faster access.
13.

Illustrate the difference between the three levels of data abstraction.

Answer»
Internal LevelConceptual Level External Level
Describes how the data is actually stored on the storage medium.Describes what data are actually stored in the database and relationship existing among data. Concerned with the data is viewed by individual users. At this level, complex low-level data structure are described in details. Concerned with the data is viewed by individual users.
At this level, complex low-level data structure are described in details.At this level, the database is described logically in terms of simple data-structures.Only a part of the database relevant to the users is provided to them through this level.
14.

Define the "integrity rules"?

Answer»

There are two Integrity rules. 

1. Entity Integrity: States that "Primary key cannot have NULL value" 

2. Referential Integrity: States that "Foreign Key can be either a NULL value or should be Primary Key value of other relation.

15.

Differentiate between Constructor and Destructor function with respect to Object Oriented Programming.

Answer»
Constructor Destructor
Constructor is used to initialize the object.Destructor is used to destroy the objects that are created in memory previously.
Constructor can takes arguments.Destructor cannot take any arguments.
Constructor overloading can be possible means more than one constructor can be defined in same class.Destructor overloading cannot be possible.
Syntax of constructor :
class class_name
{
class_sname() {}
class_name(argulist){}
} ;
Syntax of destructor: class class_name
{
 ~class-name(void){}
};
16.

Describe the three levels of data abstraction?

Answer»

The are three levels of abstraction:

1. Physical level: The lowest level of abstraction describes how data are stored. 

2. Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. 

3. View level: The highest level of abstraction describes only part of entire database.

17.

How many times the loop will execute ?for (int number = 5; number &gt;= 1; number = number-1) { System. out. print("Square of " + number); System. out. print ln(" = " + number*number); }

Answer»

5 times the loop will execute.

18.

Explain any five mathematical functions in MS excel with example.

Answer»

1.  abs() function in excel returns the absolute value of a number. The absolute value of a number is the number without its sign.

For example, Abs(-25)

output: 25

2. Fact() function returns the factorial of a number. The factorial of a number is equal to 1*2*3*…* number.

For example, fact(5)

output: 120

3. The mod() function returns the remainder after number is divided by divisor. The result has the same sign as divisor. MOD(number, divisor)

For example, Mod(5,2)

output: 1

4. The power () function returns the result of a number raised to a power. POWER(number, power)

For example, power(5,2)

output: 25

The sum() function adds all the numbers that is specified in the brackets.

For example, SUM(A1 : A5) adds all the numbers that are contained in cells A1 through A5. For another example, SUM(A1, A3, A5) adds the numbers that are contained in cells A1, A3, and A5.

19.

Write the statement to create an array that stores percentage of 5 students.

Answer»

Double [] percentage = {78.3, 89.6, 90, 78 ,67};

20.

Discuss the following terms.1. Function prototype2. Actual arguments3. formal arguments4. local variable5. Global variable.

Answer»

1. Function prototype: The declaration of a function before it is used or called is known as function prototype.

Ex: int demo (int, int, int);

2. Actual arguments: Actual parameters: the data that is passed by the calling function as arguments/parameters is known as actual arguments, i.e., the arguments which are present at the time of function call.

3. Formal arguments: Formal parameters: are the names of the argument/parameter in the function header of called function. Formal parameter values are used by the called function body.

4. Local (internal) Variables: The variables declared within function block are called local variables. A variable can be used only within the function where it is defined in. Such a variable is accessible only from the function or block in which it is declared.

5. Global Variables: They are the variables that are declared outside of main( ) function body or any other functional block. These variables can be used by all modules and functions in the program. 

21.

Explain the difference between a Class and an Object with an example.

Answer»

1. A class is a physical or logical entity that has certain attributes. A class is a template from which objects are created. Object is an instance of a class . 

2. Class book can have title, author, publisher, price as the data members. To display the details of class book you would call the method member display() Method members of a class are invoked through the object like book1 to perform the action associated with that method

Class is a blueprint or template from which objects are created. 
Object is a real world entity such as pen, laptop, mobile, bed, keyboard, mouse, chair etc. Class is a group of similar objects. Object is a physical entity.
22.

Find the error and give correct code int number = 1; while (number &lt;= 5) {System.out.print("Square of " + number); System.out.println(" = " + number*number);}

Answer»

Correct code :

int number = 1; 

while (number <= 5) 

{System.out.print("Square of " + number); 

System.out.println(" = " + number*number); number++; }

23.

Read the code carefully and give its output :package javaprogarms;public class StringDemo{public static void main(String[]args) {String myString = "INFORMATION TECHNOLOGY"; System.out.println(myString.indexof(’E’)); System.out.println(myString.contains("NO")); System.out.println(myString.length(); }};

Answer»

13 

True 

22

24.

Give differences between while loop and do while loop

Answer»

While loop :

1. A while loop is an entry controlled loop 

2. Body of loop may never be executed 

3. The variables in the test condition must be initialized prior to entering the loop structure

Do while loop :

1. A do-while loop is an exit control loop - 

2. Body of loop is executed at least once 

3. It is not necessary to initialize the variables in the test condition prior to entering the loop structure.

25.

What will be the value of n after the execution of the following selection statement : int n=0; if (6&gt;7 II 5&gt;4){n=5;} else n=7;

Answer»

n=5 will be the value of n after the execution

26.

What is the need of a constructor in OOP? Also write one feature of a constructor.

Answer»

1. A special method member called the constructor method is used to initialize the data members of the class. Feature 

2. The constructor has the same name as the class, has no return type, and may or may not have a parameter list. 

Or 

Whenever a new object of a class is created, the constructor of the class is invoked automatically

27.

Find the ratio between two numbers such that their sum is 40 and their difference is 8.

Answer»

Let the two numbers be x & y 

Given x + y = 40 ……. (1) 

& x – y = 8 … (2) 

Solving we get 

Adding 2x = 48 ⇒ x = 24 & y = 40 – 24 = 16 

∴ Ratio of the numbers is 24 : 16 ⇒ 3:2.

28.

If p, q and r are propositions with truth values F, T and F respectively, then find the truth value of the following compound proposition: (p ∧ q) v ~ r

Answer»

(p ∧ q) ∨ ~ r 

(F ∧ T) ∨ ~ r 

F ∨ T = T

29.

Allergy is an example of which type of ADR

Answer» Allergic reactions to drugs refer to those ADRs that involve immune mechanisms which account up to 15% of ADRs and can be identified as being a type I through IV immune reaction that the most common immunologic mechanism is IgE-mediated- type I reaction.
30.

Resistors \( R_{1}, R_{2} \) and \( R_{3} \) having values \( 5 \Omega, 10 \Omega \), and \( 30 \Omega \) respectively are connected in parallel across a battery of 12 volt Calculate(a) the current through each resistor(b) the total current in the circuit and(c) the total circuit resistance

Answer»
According to the question,
 
Resistors R1,R2 and R3 having values 5Ω, 10Ω and 30Ω are connected in parallel across a battery of 12 V. 

(a) We know that when resistors are connected in parallel combination, the total current flowing through the circuit is divided amongst the separate branches of the parallel combination, while the potential difference remains the same for the whole circuit. 


Potential difference = 12 V

Let current through R be I1 . Then, 
I1 = V/R1 = 12/5 = 2.4 A 

Let current through R2 be I2 . Then, 
I2 = V/R2 = 12/10 = 1.2 A 

Let current through R3 be I3 . Then, 
I3 = V/R3 = 12/30 = 0.4 A 

(b) We know that the total current flowing through a parallel combination of resistors is equal to the sum of the separate currents through each branch of the parallel combination. 

Let the total current flowing through the circuit be I. Then, 
I = I1 + I+ I
I = 2.4 + 1.2 + 0.4
I = 4 A 

Therefore, the total current flowing though the parallel combination of resistors is 4 A. 

(c) We know that the reciprocal of the total circuit resistance of a parallel combination of resistors is equal to the sum of the reciprocals of the individual resistances in the parallel combination. 

Let the total circuit resistance of the parallel combination be Rp. Then, 

1/Rp = 1/R1 + 1/R2 + 1/R

1/Rp = 1/5 + 1/10 + 1/30

1/Rp = (6+3+1) / 30

1/Rp = 10/30 

1/Rp = 1/3 

Rp = 3Ω

Therefore, the total circuit resistance of the parallel combination of resistors is 3Ω. 
31.

What are independent events? Give one example.

Answer»

(a) If two events cannot occur simultaneously in a random experiment then they are called mutually exclusive events 

(b) Events are said to be independent, if the occurrence of one does not depend upon the occurrence of the other 

(c) In a random experiment, let S be the sample space & let E be an event then E C S, So ‘E’ is also an event called the complementary of E.

32.

Find x and y given that[-9, 2] - [5, - 1] = [x, y]

Answer»

Given [-9, 2] - [5, - 1] = [x, y]

⇒ [x, y] = [(-9, -5), (2 - (- 1))] = [-14, 3]

⇒ x = - 14, y = 3.

33.

Evaluate: ∫(2x + 3)(x2 + 3x + 5)3/2dx.

Answer»

Substituting x2 – 3x + 5 = t to get (2x + 3)dx = dt 

∴ Given integral becomes ∫t3/2dt 

Integrating to get t52/52 + C = 2/5(x2 + 3x + 5)52 + C

34.

Integrate x2sin x with respect to x.

Answer»

∫x sin xdx = -x2cosx – ∫-cosx.2xdx 

= -x2 cosx + 2[xsinx – ∫sinx.dx] 

= -x2cosx + 2xsinx + 2cosx + C

35.

If y = (a2 – x2)10, find dy/dx

Answer»

dy/dx = 10(a2 – x2)9 (0 – 2x) 

= – 20x(a2 – x2)9

36.

Integrate the following x2 – 6/x + 5ex 

Answer»

∫x2 - 6/x + 5exdx = x3/3 - 6logx + 5ex + c

37.

Prove that cosecθ √1 − cos2 θ ​ =1.

Answer»

Identity : sin2θ+cos2θ = 1

LHS = cosec θ \(\sqrt{(1-cos^2\theta)}\) 

 = cosec θ\(\sqrt{sin^2\theta}\)

 = cosec θ sin θ

 = \(\frac1{sin\theta}\times sin\theta\)

 = 1

= RHS

38.

Integrate (x2 – 6/x + 5ex) with respect to x.

Answer»

x3/3 6logex + 5ex + C

39.

Solve: 5ex – logx – 3√x

Answer»

Let y = 5ex – log x – 3√x

dy/dx = 5ex - 1/x - 3(1/2√x)

40.

Find the vector equation of the line parallel to the line (x-1)/5=(3-y)/2=(z+1)/4 and passing through (3,0,-4).Pls help :(

Answer» X-1/5=3-Y/2=Z+1/4

a-=5,b=-2,c=4

then the according to formula x-3/5=y/-2=z+4/4
41.

Differentiate : 5ex – logex – 3√x w.r.t.x.

Answer»

\(\frac{dy}{dx} = 5e^x - \frac{1}{x} - \frac{3}{2\sqrt x}\)

42.

Differentiate (5ex – logx – 3√x) with respect to x. 

Answer»

5ex - 1/x - 3/2x

43.

How many different sphere of radius 'r' can be drawn which touches all the three co-ordinate axes

Answer»

There are eight octants, so sphere can be possible in eight octants.

44.

Define oxidation and reduction in terms of change in oxidation number.

Answer»

Oxidation is defined as the chemical change in which there occurs an increase in the oxidation number of an atom or atoms while reduction may be defined as a chemical change in which there occurs a decrease in the oxidation number of an atom or atoms.

45.

The speed of a car increases uniformly from zero to `10ms^-1` in `2s` and then remains constant (figure) a. Find the distance travelled by the car in the first two seconds. b. Find the distance travelled by the car in the next two seconds. c. Find the total distance travelled in `4s`.

Answer» a. Distance=area`=1/2xx2xx10=10m`
b. Distance =area=`2xx10=20m`
c. Total distance `=10+20=30m`
46.

In India, the problem of soil erosion is associated with which of the following?1. Terrace cultivation 2. Deforestation 3. Tropical climate Select the correct answer using the code given below. (a) 1 and 2 only (b) 2 only (c) 1 and 3 only (d) 1, 2 and 3

Answer»

(b) In India, the problem of soil erosion is associated with deforestataion .Terace cultivation helps in less erosion of soil.

47.

The number of atoms in 4.25 g of NH3 is(a) 4 x 1023(b) 2 x 1023(c) 1 x 1023(d) 6 x 1023

Answer»

The correct answer is (d) 6.023 × 1023

One mole of a chemical entity can be defined as equal to 6.023×1023 particles of that substance, where “particles” can mean “atoms, molecules, and the different subatomic particles”. We shall calculate the moles of the compound given and thus, the number of particles.

Formula Used: \(moles = \frac{mass}{molar\, mass}\)

The molecular weight of ammonia is equal to the sum of the atomic weights of nitrogen and hydrogen atoms = [14+(3×1)]= 17 grams

Hence, 17 grams of ammonia = 6.023×1023 molecules of ammonia.

Therefore, 4.25g of ammonia \(= \frac{6.023 \times 10^{23}}{17} \times 4.25 = 1.505 \times 10^{23}\) molecules of ammonia.

Now each molecule of ammonia has four atoms, one atom of nitrogen and three atoms of hydrogen. Hence, the total number of atoms in 1.505 x 1023 molecules of ammonia

= 4×1.505 × 1023

= 6.023 × 1023 atoms.

48.

\( NH _{3} \) के \( 100 g \) में उसके अणुओं की संख्या ज्ञात कीजिए।

Answer»

Molecular weight at NH3 = 17 g/mol

∴ Number of moles of NH3 in 100 g = 100/17 mol = 5.9 mol

As we know,

1 mole of any molecule contains = 6.022 x 1023 = molecules.

∴ Number of NH3 molecule in 5.9 mole NH3

 = 5.9 x 6.022 x 1023

 = 35.53 x 1023

 = 3.55 x 1024 NH3 molecule.

Hence, 100g NH3 contains 3.55 x 1024 molecule of NH3.

49.

किसी पदार्थ के \( 7.2 g \) को \( 100 g \) पानी में घोलने से वाष्पदाब का आपेक्षिक अवनमन \( 0.00715 \) होता है । पदार्थ का अणु द्रव्यमान ज्ञात कीजिए।

Answer»

Let say, molecular weight of substance is x g/mol.

As we know, relative lowering of vapour pressure is equal to the mole fraction of solute.

∴ \(\frac{P^o-P_s}{P_o}=x_2\)------(1)

where, \(\frac{P^o-P_s}{P^o}\) = relative lowering in vapour pressure  = 0.00715

x2 = mole fraction of substance (solute)

Number of moles of water = 100/18 = 5.56 mol

Number of moles of substance = 7.2/x = mol

∴ x2 = \(\cfrac{\frac{7.2}x}{5.56+\frac{7.2}x}\)

 ∵ the moles of solvents are always much greater than moles of solution. So that we can neglect 7.2/x as compare to 5.56.

∴ x2 = \(\cfrac{\frac{7.2}x}{5.56}\)

⇒ x = \(\frac{7.2}{5.56\times0.00715}\)

x = 181.1 g/mol

Hence, the molecular weight of substance will be 181.1g/mol.

50.

द्वि दांतुर लीगेंड का उदाहरण बताइए

Answer»

वह लिगेंड जिसमें केंद्र धातु परमाणु या आयन से दो परमाणु बंध बनाने में समर्थ होते है उसे द्वि दंतुक लिगेंड कहते है अर्थात इस लिगेण्ड में दो दाता परमाणु उपस्थित रहते है , एथेन-1,2- डायएमीन आदि द्विदंतुक लिगेण्ड के उदाहरण है|