Explore topic-wise InterviewSolutions in .

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

301.

How many wooden cubical blocks of side 25 cm can be cut from a log of wood of size 3 m by 75 cm by 50 cm, assuming that there is no wastage?

Answer»

Given details are,

Dimensions of log of wood = 3m × 75cm × 50cm

Side of cubical block = 25cm

We know that,

Number of cubical block that can be made from wooden log =

Volume of wooden block / volume of cubical block

= (300 × 75 × 50) / (25 × 25 × 25)

= 72 blocks

302.

How many planks of size 2 m x 25 cm x 8 cm can be prepared from a wooden block 5 m long, 70 cm broad and 32 cm thick, assuming that there is no wastage?

Answer»

We know that, 

Volume of cuboid = Length × Breadth × Height 

Therefore, 

Total volume of the block = (500 × 70 × 32) 

= 1120000 cm3 

Total volume of each plank = 200 × 25 × 8 

= 40000 cm3 

Hence,

Total number of planks that can be made = \(\frac{Total\,volume\,of\,the\,block}{Volume\,of\,each\,plank}\)

\(\frac{1120000}{40000}\)

= 28 planks

303.

A water tank is 3 m long, 2 m broad and 1 m deep. How many litres of water can it hold?

Answer»

Given details are,

Length of water tank = 3m

Breadth of water tank = 2m

Height of water tank = 1m

So, Dimensions of water tank is = 3m × 2m × 1m

Volume the water tank can hold = l × b × h

= 3 × 2 × 1

= 6m3

= 6000 litres

∴ The water tank can hold 6000 litres of water.

304.

Mention the two types of overloading.

Answer»

The two types of overloading is operator overloading and function overloading.

305.

Explain inheritance.

Answer»

Inheritance is the process of creating new classes, called derived class, from existing or base classes. The derived class inherits all the capabilities of the base class. Using Inheritance some qualities of the base classes are added to the newly derived class, apart from its own features. Inheritance permits code reusability.

306.

The cost of constructing a wall 8 m long, 4 m high and 20 cm thick at the rate of Rs. 25 per m3 isA. Rs. 16B. Rs. 80C. Rs. 160D. Rs. 320

Answer»

Correct option is C. Rs. 160

Given,

Length of wall = 8m

Breadth of wall = 4 m

Thickness of wall = 20 cm = \(\cfrac{20}{100}m\)

Volume of wall = \(l\times b\times h\) = 8 \(\times4\times\cfrac{20}{100}\) = \(\cfrac{32}5m^3\)

∵ cost of construction of 1m3 wall = Rs. 25

∴ cost of construction of \(\cfrac{32}5\)m3 wall = \(\cfrac{32}5\times25\) = Rs. 160

307.

Given that 1 cubic cm of marble weighs 0.25 kg, the weight of marble block 28 cm in width and 5 cm thick is 112 kg. Find the length of the block.

Answer»

Given,

Weight of 1m3 marble = 0.25 kg

Weight of marble 28 cm wide and 5 cm thick = 112 kg

Let length of block = \(l\) cm

Then volume of block = \(l\) × 28 × 5 cm3 = 140 \(l\) cm3

Weight of block = 140 \(l\) × 0.25

= 112 = 140 \(l\) × 0.25

\(=​​​​l=\cfrac{112\times100}{140\times0.25}\) = 3.2 cm

308.

A beam 5 m long and 40 cm wide contains 0.6 cubic metre of wood. How thick is the beam?

Answer»

Given details are,

Length of beam = 5 m

Width of beam = 40 cm = 0.4 m

Volume of wood in beam = 0.6 m3

Let thickness of beam be ‘h’ m

We know that,

Volume = l × b × h

h = volume/(l × b)

= 0.6/(5×0.4)

= 0.3m

∴ Thickness of the beam is 0.3m

309.

How many planks each of which is 3 m long, 15 cm broad and 5 cm thick can be prepared from a wooden block 6 m long, 75 cm broad and 45 cm thick?

Answer»

Given details are,

Dimensions of one plank = 3m × 15cm × 5cm = 300cm × 15cm × 5cm

Dimensions of wooden block = 6m × 75cm × 45cm = 600cm × 75cm × 45cm

We know that,

Number of planks that can be prepared = volume of wooden block / volume of one plank

= (600 × 75 × 45) / (300 × 15 × 5)

= 90 planks

∴ 90 planks are required to prepare the block.

310.

Explain advantages of OOPs.

Answer»
  1. OOP provides a dear modular structure for programs. Large problems can be reduced to smaller and more manageable problems.
  2. In OOP, data can be made private to a class such that only member functions of the class can access the data. This principle of data hiding helps the programmer to build a secure program.
  3. Implementation details are hidden from other modules and other modules has a clearly defined interface.
  4. It is easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
  5. With the help of polymorphism, the same function or same operator can be used for different purposes. This helps to manage software complexity easily.
  6. In OOP, programmer not only defines data types but also deals with operations applied for data structures.
  7. It is easy to model a real system as real objects are represented by programming objects in OOP. With the help of inheritance, we can reuse the existing class to derive a new class such that the repetition of code is eliminated and the use of existing class is extended. This saves time and cost of program.
311.

Mention different types of inheritance.

Answer»

The different types of inheritance are single inheritance, multilevel inheritance, multiple inheritances, hierarchical inheritance and hybrid inheritance.

312.

Explain the structure of object.

Answer»

The object is a collection of data members and member functions. Objects occupy space in memory and have address associated with them. Objects interact by sending messages to one another.

313.

What is output stream?

Answer»

Output stream is a sequence of characters from the program to an output device like monitor, printer.

314.

Write the disadvantages of object oriented programming.

Answer»

The few disadvantages of OOP are:

1. Size:

Object-Oriented programs are much larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium. Today we do not have these restrictions.

2. Effort:
Object-Oriented programs require a lot of work to create. Specifically, a great deal of planning goes into an object-oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. In addition, because the programs were larger (see above) coders spent more time actually writing the program.

3. Speed:
Object-Oriented programs are slower than other programs, partially because of their size. Other aspects of Object-Oriented Programs also demand more system resources, thus slowing the program down.

4. Not suitable for all types of problems:
There are problems that lend themselves well to functional-programming style, logic -programming style, or procedure-based programming style, and applying object-oriented programming in those situations will not result in efficient programs.

5. Not all programs can be modeled accurately by the objects model. If you just want to read in some data, do something simple to.it and write it back out, you have no need to define classes and objects. However, in some OOP languages, you may have to perform this extra step.

6. The objects often require extensive documentation.

315.

Write the differences between procedural programming and object oriented programming.

Answer»

Difference between Procedure Oriented Programming (POP) & Object Oriented Programming (OOP)

Procedure Oriented ProgrammingObject-Oriented Programming
In POP, program is divided into small parts called functions.In OOP, program is divided into parts called objects.
In POP, Importance is not given to data but to functions as well as sequence of actions to be done.In OOP, Importance is given to the data rather than procedures or functions.
POP follows Top Down approach.OOP follows Bottom Up approach.
POP does not have any access specifier.OOP has access specifiers named Public, Private, Protected, etc.
In POP, Data can move freely from function to function in the system.In OOP, objects can move and communicate with each other through member functions.
To add new data and function in POP is not so easy.OOP provides an easy way to add new data and function.
POP does not have any proper way for hiding data so it is less secure.OOP provides Data Hiding so provides more security.
In POP, Overloading is not possible.In OOP, overloading is possible in the form of Function Overloading and Operator Overloading.’
316.

Mention any 4 high level languages that follow object oriented programming approach.

Answer»

The four high level languages that follow object oriented programming approach are

  • C++
  • C#
  • Java
  • Python
  • Visual Basic
317.

Mention any two advantages of object oriented programming over earlier programming methods.

Answer»

1. OOP provides useful features like Inheritance, polymorphism, and encapsulation, not available in earlier programming methods.

2. Once an object is created, knowledge of its implementation is not necessary for its use. In older programs, coders needed understand the details of a piece of code before using it in this or another program.

318.

A godown measures 40 m × 25 m × 10 m. Find the maximum number of wooden crates each measuring 1.5 m × 1.25 m × 0.5 m that can be stored in the godown.

Answer»

The godown has its length (l1) as 40 m, breadth (b1) as 25 m, height (h1) as 10 m, while the wooden crate has its length (l2) as 1.5 m, breadth (b2) as 1.25 m, and height (h2) as 0.5 m.

Therefore, volume of godown 

= l1 × b1 × h1 = (40 × 25 × 10) m3

= 10000 m3 = (1.5 × 1.25 × 0.5) m3

= 0.9375 m3

Let n wooden crates can be stored in the godown.

Therefore, volume of n wooden crates = Volume of godown 0.9375 × n = 10000

n = 10000/0.9375 = 10666.66

Therefore, 10666 wooden crates can be stored in the godown.

319.

Name function used for string output.

Answer»

The function write() is used for string output.

320.

How is string declared?

Answer»

The declaration of string is
char arrayname[ size];

321.

Write the real life applications of object oriented programming.

Answer»

Some of the real-life applications of object-oriented programming are given below;

  • Computer graphic applications
  • CAD/CAM software
  • Object-oriented database
  • User interface design such as windows
  • Real time systems
  • Simulation and modeling
  • Artificial intelligence and expert systems.
322.

List any two basic types of standard library functions.

Answer»
  1. I/O Functions.
  2. Mathematical Functions – math.h
323.

What is a Predefined Functions in C++?

Answer»

Predefined functions are functions that are built into C++ Language to perform some standard operations that are stand-alone and used for general purposes.

324.

What is the fundamental idea of object oriented programming?

Answer»

Object-oriented programming (OOP) is a programming language model organized around “objects” rather than “actions” and data rather than logic of the program.

325.

Give the syntax of cout statement.

Answer»

Syntax: cout << expression or manipulator

326.

Write the declaration syntax of two-dimensional array.

Answer»

Syntax:
<data-type> <array-name> [<size1>] [<size2>];

327.

How is a member of a structure accessed?

Answer»

The member of structure is accessed using dot (.) operator.

328.

What purpose does structure definition serve?

Answer»

The structure definition acts as a blueprint for the creation of variables.

329.

What is the structure template?

Answer»

The list of all structure members is called a template.

330.

The Coefficients of variation of two series are 30% and 25% and their standard deviations are 15 and 9 respectIvely. Find their means.

Answer»

First Series:

Coefficient of variation: 30%

s = 15

x̄ = ?

Coefficient of variation = \(\frac{s}{\bar x}\) × 100

∴ 30 = \(\frac{15}{\bar x}\) × 100

∴ 30x̄ = 1500

∴ x̄ = \(\frac{1500}{30}\)

∴x̄ = 50

Second series:

Coefficient of variation: 25%

s = 9

x̄ = ?

Coefficient of variation = \(\frac{s}{\bar x}\) × 100

∴ 25 = \(\frac{9}{\bar x}\) × 100

∴ 25x̄ = 900

∴ x̄ = \(\frac{900}{25}\)

∴x̄ = 36

331.

Write the declaration syntax for a structure variable.

Answer»

The general syntax for declaration of structure variable is Structurename variable;

332.

What is the main function of iomanip.h header file?

Answer»

The iomanip.h header file contains various function and macros for i/o manipulations for creating parameterized manipulations.

333.

Find the ratio of the curved surface areas of two cones if their diameters of the bases are equal and slant heights are in the ratio 4 : 3.

Answer»

We have, 

r1 = r2 

let , 

l1 =4x, 

l2 = 3x

\(\frac{S_1}{S_2}=\frac{\pi r_1l_1}{\pi r_2l_2}\) \(=\frac{l_1}{l_2}=\frac{4}{3}\)

334.

Identify the odd one based on farming.A) Rice B) Tea C) Rubber D) Sugarcane

Answer»

Answer is (C) Rubber

335.

Distinguish between mixed cropping and mixed farming. 

Answer»

Mixed cropping is the growing of two or more crops simultaneously intermingled with each other without a definite row pattern with the object of minimising risk of crop failure. 

Mixed farming is a method by which the farmer uses some part of his land for additional activities like cattle rearing, poultry or fishing in order to earn additional income and minimise risks associated with agriculture. 

336.

Distinguish between mixed cropping and inter cropping. 

Answer»

Mixed cropping is the growing of two or more crops simultaneously intermingled with each other without a definite row pattern with the object of minimising risk of crop failure. 

Inter cropping is growing of two or more crops simultaneously in the same field in a definite row pattern with the object of increasing the productivity per unit area.

337.

India produces about of …….. the world’s vegetables. A) 2/5 B) 1/4 C) 2/5 D) 1/6

Answer»

India produces about of 1/6 the world’s vegetables.

338.

Why are leguminous plants an important component of any cropping system? 

Answer»

Nitrogen is an essential element for plant growth. Leguminous plants are instrumental in restoring the nitrogen supply of the soil. Therefore leguminous plants are alternated with other crops, reducing fertiliser needs. 

339.

Which one of the following is a leguminous crop? A) Pulses B) Millets C) Jowar D) Sesamum

Answer»

Pulses is a leguminous crop

340.

Find the surface area of a cuboid whose length = 2 m, breadth = 4 m, height = 5 m.

Answer»

Given details are,

Length of a cuboid = 2m

Breadth of a cuboid = 4m

Height of a cuboid = 5m

We know that,

Surface area of cuboid = 2 (lb + bh + hl) cm2

= 2 (2×4 + 4×5 + 5×2)

= 2 (8 + 20 + 10)

= 2 (38)

= 76 m2

341.

If the areas of three adjacent faces of a cuboid are 8 cm2, 18 cm2 and 25 cm3. Find the volume of the cuboid.

Answer»

Given, 

Area of 3 adjacent faces of cuboid = x= 8 cm2 , y = 18 cm2 , z = 25 cm2

From previous question we get,

= v2 =xyz

= v2= 8 × 18 × 25 = 3600

= v = \(\sqrt{3600}\) = 60 cm3

342.

The areas of three adjacent faces of a cuboid are x, y, and z. If the volumes is V, prove that V2 = xyz.

Answer»

Given,

Area of 3 adjacent faces of a cuboid = x, y, z

V = volume of cuboid

Let  a, b, c are respectively length, breadth, height of each faces of cuboid

So, x = ab

= y = bc

= z = ca

V = abc

Hence , xyz = ab × bc × ca = (abc)2 = v2 (v=abc)

= v2 = xyz Proved.

343.

The areas of three adjacent faces of a cuboid are x, y, and z. If the volume is V, prove that V2 = xyz.

Answer»

Let us consider,

Areas of three faces of cuboid as x,y,z

So, Let length of cuboid be = l

Breadth of cuboid be = b

Height of cuboid be = h

Let, x = l×b

y = b×h

z = h×l

Else we can write as

xyz = l2 b2 h2….. (i)

If ‘V’ is volume of cuboid = V = lbh

V2 = l2 b2 h2 = xyz …… from (i)

∴ V2 = xyz

Hence proved.

344.

The areas of three adjacent faces of a cuboid are x, y and z. If the volume is V, Prove that V2 = xyz.

Answer»

Let a, b and c be the length, breadth, and height of the cuboid. 

Then, x = ab, y = bc and z = ca [Since areas of three adjacent faces of a cuboid are x, y and z (Given)] 

And xyz = ab x bc x ca = (abc)2 ……(1) 

We know, Volume of a cuboid ( V ) = abc …..(2) 

From equation (1) and (2), we have 

V2 = xyz 

Hence proved.

345.

A hemispherical bowl made of brass has inner diameter 10.5 cm. Find the cost of the plating it on the inside at the rate of Rs. 4 per 100 cm2.

Answer»

Surface area of a hemisphere = 2πr2 

Given, 

diameter of the hemisphere bowl is 10.5 cm 

Surface area of the bowl = 2 × (22/7) × (10.5/2)2 = 173.25 cm2 

Given, 

cost of the plating it on the inside at the rate of Rs. 4 per 100 cm2

Cost of plating the hemisphere bowl = \(\frac{4}{100}\times\) 173.25 

= Rs. 6.93

346.

Factorize: 125x3 – 27y3 – 225x2y + 135xy2.

Answer»

125x3 – 27y3 – 225x2y + 135xy2 

Above expression can be written as (5x)3−(3y) 3−3(5x)2(3y) + 3(5x)(3y)2 

Using: a3 − b3 − 3a2b + 3ab2 = (a−b)3 

= (5x − 3y)3

347.

Factorize:p3 + 27

Answer»

p3 + 27 

= p3 + 33   [a3 + b3 = (a + b)(a2 –ab + b2)] 

= (p + 3)(p2 – 3p – 9) 

Therefore, p3 + 27 = (p + 3)(p2 – 3p – 9).

348.

Factorize: 8x3 + 27y3 + 36x2y + 54xy2.

Answer»

8x3 + 27y3 + 36x2y + 54xy2 

Above expression can be written as (2x)3 + (3y)3 + 3 x (2x)2 x 3y + 3 x (2x)(3y)2 

Which is similar to [a3 + b3 + 3a2b + 3ab2 = (a + b)3

Here a = 2x and b = 3y 

= (2x+3y)3 

Therefore, 8x3 + 27y3 + 36x2y + 54xy2 = (2x+3y)3

349.

A hemispherical bowl is made of brass, 0.25 cm thickness. The inner radius of the bowl is 5 cm. Find the ratio of outer surface area to inner surface area.

Answer»

Inner radius of the hemisphere ‘r’ = 5 cm 

Outer radius of the hemisphere ‘R’ 

= inner radius + thickness 

= (5 + 0.25) cm = 5.25 cm 

Ratio of areas = 3πR2 : 3πr2 

= R2 : r2 

= (5.25)2 : 52 

= 27.5625 : 25 

= 1.1025:1 

= 11025 : 10000 

= 441 : 400 

350.

How many cuboids of size 4 cm × 3 cm × 2 cm can be made from a cuboid of size 12 cm x 9cm x 6cm?

Answer»

Volume of a cuboid of measures 12 cm × 9 cm × 6 cm

V1 = l1× b1 × h1 = 12 × 9 × 6

Volume of the smaller cuboid of measures 4 cm × 3 cm × 2 cm

V2 = l2b2h2 = 4 × 3 × 2

∴ No. of cuboids are made

= V1/V2 = (12 × 9 × 6)/(4 × 3 × 2) = 27