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.

118851.

Solve the following equations.i. x + 7 = 4 ii. 4p = 12 iii. m – 5 = 4iv. t/3 = 6

Answer»

i. x + 7 = 4 

∴ x + 7 – 7 

= 4 – 7 ….(Subtracting 7 from both sides) 

∴ x + 0 = -3 

∴ x = -3 

ii. 4p = 12 

∴ 4p/4 = 12/4 ….(Dividing both sides by 4) 

∴ p = 3 

iii. m – 5 = 4 

∴ m – 5 + 5 = 4 + 5 …. (Adding 5 to both sides)

∴ m + 0 = 9 

∴ m = 9 

iv. t/3  = 6

∴ t/3 × 3 = 6 × 3 …. (Multiplying both sides by 3) 

∴ t = 18

118852.

Shubhangi has twice as many 20- rupee notes as she has 50-rupee notes. Altogether, she has 2700 rupees. How many 50-rupee notes does she have?

Answer»

Let the number of 50-rupee notes with shubhangi be x.

∴ Number of 20-rupee notes = 2x 

∴ Total amount with Shubhangi = Number of 50-rupee notes × 50 + Number of 20-rupee notes × 20 

= x × 50 + 2x × 20 

= 50x + 40x 

= 90x 

According to the given condition, 

90x = 2700 

∴ x = 2700/90 = 30

∴ Shubhangi has 30 notes of 50 rupees.

118853.

A grandfather is ten times older than his granddaughter. He is also 54 years older than her. Find their present ages.

Answer»

Let age of grand daughter be x
age of grandfather is 10 x
A/Q
10 x = 54 + x
9 x = 54
x = 6
10 x = 60
age of grandfather is 60
age of granddaughter is 6

118854.

Rakesh’s age is less than Sania’s age by 5 years. The sum of their ages is 27 years. How old are they?

Answer»

Let the age of Rakesh be x years.

∴ Sania’s age = (x + 5) years. 

According to the given condition, 

x + (x + 5) = 27 

∴ 2x + 5 = 27 

∴ 2x = 27 – 5 

∴ 2x = 22 

∴ x = 22/2 = 11

∴ Sania’s age = x + 5 = 11 + 5 = 16 years 

∴ The ages of Rakesh and Sania are 11 years and 16 years respectively.

118855.

What holds the crystalline lens in the human eye?

Answer»

Ciliary muscles.

118856.

Name the part of the eye which is a hole in the middle of the iris ………………… A) eye lens B) retina C) iris D) pupil

Answer»

Correct option is  C) iris

118857.

Is for loop pretest type of loop ?

Answer»

Yes. The second clause (the condition) is evaluated before each iteration through a loop.

118858.

Can you use one or more loop inside any another while, for or do., while loop ?

Answer»

yes, Can you use one or more loop inside any another while, for or do., while loop.

118859.

Write the name of loop which executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

Answer»

The for-loop of the loop which executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

118860.

Define Variable.

Answer»

It is the name of space inside computer memory values can be stored.

118861.

Use IDLE to calculate :(a)  6 + 4 * 10 (b)  (6 + 4) * 10

Answer»

(a)  6 + 40 = 46 

(b)  10 * 10 = 100

118862.

In this experiment which gas is producedA) oxygen B) carbondioxide C) hydrogen D) nitrogen

Answer»

Correct option is B) carbondioxide

118863.

In this experiment what are the liquids in the first, and second test tubes?A) Acid and Base B) Base and Acid C) Acid and Acid D) Base and Base

Answer»

Correct option is A) Acid and Base
 

118864.

What is the experiment in this diagram?A) Crystallization B) Galvanisation C) Corrosion D) Rust

Answer»

Correct option is A) Crystallization

118865.

In this picture what changes do you observe?A) Chemical change B) Permanent change C) Both A & B D) Physical change

Answer»

Correct option is C) Both A & B

118866.

Observe the following changes and decode weather they are physical or chemical changes? Mention the reason, a) Preparation of tea b) Making dough for roti.

Answer»

a) This is a chemical change. Water + Milk + Tea powder + Sugar → Tea Here tea is a new substance. Hence it is a chemical change, 

b) Making dough for roti is a physical change as there is no formation of new substance.

118867.

Which function returns the length of the string?(a) str len( )(b) len(str)(c) length( )(d) strlength( )

Answer»

(b) len(str)

118868.

Write note on replace function?

Answer»

The replace function replaces all occurrences of char 1 with char 2.

Example

>>> str1 = ”How are you”

>>> print (str1)

How are you

>>>print (str1.replace(“o”, “e”))

Hew are yeu

118869.

Differentiate between top down and bottom up methods of modular programming.

Answer»
Top-Down MethodBottom-up Method
The principle of the top-down method dictates that a program should be divided into the main module and its related module. Each module should also be divided into sub-modules according to software engineering and programming style. The division continues until the module consists only of an elementary process that is intrinsically understood and cannot be further subdivided.Bottom-up method is just the opposite of the top-down method. It refers to a style of programming in which an application is constructed with existing primitives of the programming language and then gradually more and more complicated features are added till applications are written. In other words, initiating the design with simple modules and then build them into more complex structures ending at the top is a bottom-up method.
118870.

What is the difference between modular programming and structured programming ?

Answer»

Modular programming: It is the act of designing and writing programs as interactions among functions that each performs a single well-defined function & which have minimal side effect interaction between them. It is heavily procedural. The focus is entirely on writing code (functions). Data is passive. Any code may access the contents of any data structured passed to it. 

Object Oriented programming: it is a programming using “objects”-data structures consisting of data fields & methods together with their interactions to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism/and inheritance.

118871.

Explain Modular programming.

Answer»

(i) Modular programming is the technique which divides the entire program into smaller modules, which perform a specific task. 

(ii) It can often be used in a variety of applications and functions with other components of the system. 

(iii) The order in which the modules are executed by the computer is controlled by the main program. This describes fully the procedures required in the solution to a problem. The procedures are written in the order of the machine execution. 

(iv) OPP is compatible with the modular programming concept to a large extent. Modular Programming enables multiple programmers to divide up the work and debating pieces of the program independently.

118872.

Write a program to replace a string with another string without using replace ( )?

Answer»

s1 = input (“Enter the string to be replaced: “)

s2 = input (“Enter the string to replace with “)

s1 = s2 

print (“Replaced string is “ , s1)

Output:

Enter the string to be replaced: Computer

Enter the string to replace with: repcomputer 

Replaced string is repcomputer

118873.

Strings in python can be created using …….. quotes (a) Single(b) Double(c) Triple(d) All the above

Answer»

(d) All the above

118874.

Write a program to count the occurrences of each word in a given string?

Answer»

def word_count(str):

counts = dict ( )

words = str.split ( ) for word in words:

if word in counts:

counts[word] +=1

else:

counts[word]=1

return counts

print (word_count (‘the quick brown fox jumps over the lazy dog.’))

Ouput:

{‘the’: 2, ‘jumps’: 1, ‘brown’: 1, ‘lazy’: 1, ‘fox’: 1, ‘over’: 1, ‘quick’: 1, ‘dog’: 1}

118875.

Write a note about count ( ) function in python?

Answer»
SyntaxDescriptionExample
count(str,beg,end)Returns the number of substrings occurs the given range.
Remember that substring may be a single character. Range (beg and end)  arguments are optional. if it is not given, python search is case sensitive.
>>>strl1="Raja Raja Chozhan"
>>>print(str1.count('Raj'))2
>>>print(str1.count('r'))0
>>>print(str1.count('R'))2
>>>print(str1.count('a'))5
>>>print(str1.count('a',0,5))2
>>>print(str1.count('a',11))1
118876.

Strings in python:(a) Changeable(b) Mutable(c) Immutable(d) Flexible

Answer»

(c) Immutable

118877.

Write a python program to find the length of a string?

Answer»

str=input (“Enter a string: “)

print (len(str))

Output:

Enter a string: HELLO

5

118878.

What is stride?(a) Index value of slide operation(b) First argument of slice operation(c) Second argument of slice operation(d) Third argument of slice operation

Answer»

(d) Third argument of slice operation

118879.

C++ भाषा में कितने प्रकार के फंक्शन्स होते हैं?(a) एक(b) दो(c) तीन(d) असंख्य

Answer»

(b) C++ भाषा में दो प्रकार के फंक्शन्स होते हैं-लाइब्रेरी फंक्शन व यूजर डिफाइण्ड फंक्शन

118880.

लोकल वैरिएबल किसे कहते हैं?

Answer»

जहाँ वैरिएबल एक फंक्शन या ब्लॉक में प्रयोग किए जाते हैं, लोकल वैरिएबल कहलाते हैं।

118881.

फंक्शन के लाभ लिखिए।

Answer»

फंक्शन के निम्नलिखित लाभ हैं।

⦁    फंक्शन किसी भी प्रोग्राम को छोटा बना देता है, जिससे प्रोग्राम समझने में आसानी होती है।
⦁    फंक्शन की सहायता से एक कोड को पुनः नहीं लिखना पड़ता है, यूजर अपनी आवश्यकतानुसार फंक्शन प्रोग्राम में कहीं भी प्रयोग कर सकता है।
⦁    फंक्शन के प्रयोग से प्रोग्राम में त्रुटि खोजना बहुत आसान हो जाता है।

118882.

फंक्शन को डिक्लेयर करने का प्रारूप लिखिए।

Answer»

return_type function_name(parameter_list);

118883.

किसी फंक्शन को कॉल कैसे किया जाता है?

Answer»

किसी फंक्शन को किसी प्रोग्राम में उसका नाम देकर, उसके साथ वास्तविक पैरामीटर को लगाकर एक कोष्ठक के अन्दर रखकर तथा सेमीकॉलन लगाकर कॉल किया जाता है।

118884.

ऐसे फंक्शन जो C++ भाषा में पहले से ही सम्मिलित हैं, क्या कहलाते हैं?(a) बिल्ट-इन फंक्शन(b) लाइब्रेरी फंक्शन।(c) ‘a’ और ‘b’ दोनों(d) इनमें से कोई नहीं

Answer»

(c) बिल्ट-इन या लाइब्रेरी फंक्शन C++ भाषा में पहले से ही सम्मिलित होते हैं।

118885.

Write a program to swap two strings?

Answer»

print (“Enter Y for exit.”)

string1 = input(“Enter first string: “)

if string1 = = ‘x’:

exit();

else:

string2 = input (“Enter second string : “)

print (” \n Both strings before swap : “)

print (“First string = “ , string1)

print (” Second string = “ , string2)

temp = string1

string1 = string2

string2 = temp print (“\n Both strings after swap: “) 

print (“First string = “ , string1)

print (” Second string = “ , string2)

Output:

Enter ‘x’ for exit

Enter first string: code

Enter second string: python

Both strings before swap:

First string = code

Second string = python

Both strings after swap:

First string = python

Second string = code

118886.

Write a note on C++.

Answer»
  • C++ is a typed, compiled, general-purpose, case-sensitive, free form programming language that supports procedural, object oriented, and generic programming.
  • C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features.
  • C++ was developed by Bjarne Stroustrup starting in 1979 at Bell Labs in Murray Hill, New Jersey as an enhancement to the C language and was originally named C with Classes but later it was renamed C++ in 1983. by Rick Masatti.
  • C++ is a super set of C, and virtually, any legal C program is a legal C++ program.
118887.

tan(x) फंक्शन का प्रयोग लिखिए।

Answer»

tan(x) फंक्शन किसी कोण x की टेण्जेण्ट ज्ञात करने के लिए प्रयोग होता है।

118888.

Adding more strings at the end of an existing strings is …….(a) Append(b) Concatenation(c) Repeating (d) Slicing

Answer»

Adding more strings at the end of an existing strings is Append

118889.

Joining of two or more strings is called as ……..(a) Append(b) Repeating(c) Concatenation(d) Strike

Answer»

(c) Concatenation

118890.

How will you modify the string?(a) A new string value can be assigned to the existing string variable(b) Updating the string character by character

Answer»

(a) A new string value can be assigned to the existing string variable

118891.

What is slicing?

Answer»

String slicing:

Slice is a substring of a main string. A substring can be taken from the original string by using [ ] operator and index or subscript values. Thus, [ ] is also known as slicing operator. Using slice operator, we can slice one or more substrings from a main string.

General format of slice operation:

str[start:end]

Where start is the beginning index and end is the last index value of a character in the string. Python takes the end value less than one from the actual index specified. For example, if you want to slice first 4 characters from a string, you have to specify it as 0 to 5. Because, python consider only the end value as n –1.

Example:

slice a single character from a string

>>> str1= ”THIRUKKURAL”

>>> print (str1[0])

T

118892.

वह कौन-सा फंक्शन है, जो स्वयं को ही बार-बार कॉल करता है?(a) रिकर्सिव फंक्शन(b) strlen( )(c) main( )(d) clrscr( )

Answer»

(a) रिकर्सिव फंक्शन

118893.

How are comments included in C++? Give an example.

Answer»

Comments are included using//

For example, main()

{ cout<< “Hello World”; // prints Hello World

return 0;

}

118894.

फंक्शन का प्रयोग करते हुए C++ में एक प्रोग्राम लिखिए, जो दिए गए अंकों में से सबसे बड़ा व सबसे छोटा अंक प्राप्त करें। 

Answer»

#include<iostream.h>
#include<conio.n>
int largest (int x, int y);
void main( )
{
int a, b;
cout<<“Enter the first number: “;
cin>>a;
cout<<“Enter the second number: “;
cin>>b;
largest (a, b);
getch( );
}
largest (int a, int b)
{
if(a > b)
cout<<“The first number is greater and second is smaller”;
else
cout<<“The second number is greater and first is smaller”,
}

आउटपुट

Enter the first number: 8
Enter the second number: 5
The first number is greater and second is smaller

118895.

C++ फंक्शन के केवल उस प्रोग्राम खण्ड को लिखें, जो 100 से 1 तक की गिनती ‘for’ लूप का प्रयोग करके प्रिण्ट करें। 

Answer»

Reverse ( )
{
cout<<“The Reverse number”<<end1;
for (int i = 100; i> = 1; i–)
{
cout<<i;
}
}

118896.

फंक्शन के क्या उपयोग है? 

Answer»

फंक्शन का उपयोग गणितीय गणनाएँ करने के लिए किया जाता है।

118897.

If the stride is negative, then it will prints(a) Third character(b) Third word(c) Full string(d) Reverse orde

Answer»

(d) Reverse order

118898.

Write a simple C++program.

Answer»

#include

main()

{

cout<< “Hello World”; // prints Hello World

return 0;

118899.

हैडर फाइल के विस्तारक का क्या नाम है?(a).e(b) .f(c) .h(d) इनमें से कोई नहीं

Answer»

सही विकल्प है (c) .h

118900.

फंक्शन शब्द को समझाइए। 

Answer»

प्रोग्राम को छोटे-छोटे भागों में विभाजित करना, जो किसी विशेष ऑपरेशन या कार्य उद्देश्य को पूरा कर सके, फंक्शन कहलाता है।