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.

Write the advantages of WWW.

Answer»

Advantages of WWW: 

  • Availability of mainly free information
  • Reduces the costs of information.
  • The same protocol of communication can be used for all the services. 
  • Provide rapid interactive communication.
  • Provides the exchange of huge volumes of data.
2.

What is generalization and specialization?

Answer»

1. Generalization is the process of taking the union of two or more lower-level entity sets to produce a higher-level entity sets. Generalisation is a bottom-up approach.

2. Specialization is a top-down approach in which one higher level entity can be broken down into two lower level entities.

3.

Mention any three advantages of pointer.

Answer»

The three advantages of pointer are:

  1. For objects, memory can be allocated dynamically during runtime.
  2. When objects are not used, then memory can be released.
  3. Memory is efficiently used.
4.

Why does a computer need a motherboard?

Answer»

The motherboard houses all the main components of the computer (RAM, CPU, etc.) ; provides the means for all the components to communicate, and allows expansion of the system through other circuit boards that plugs into it such as Network cards that allows network connection.

5.

Mention the types of file organisation. Explain anyone.

Answer»

The different types of file organsiation are sequential or serial organization, Direct Access or Random organization, Indexed sequential Access Method (ISAM). 

Sequential or serial organization: In sequential access, records within a file are read or written in sequential order i.e., in the same order they are organized in the file. In sequential or serial access, the information can be retrieved in the same sequence in which it is stored. The data records are arranged one after the other. The records are stored on the basis of order of the record. 

In sequential organization, the data records are stored in a predetermined order based on the key fields. There is a definite relationship between logical position and physical position. The key field organizes the records.

6.

Mention the types of files. Explain anyone.

Answer»

The text file and binary file are the two types of files in C++.

Text file:

A text file also called a ASCII file is a stream of characters that can be sequentially processed in forward direction by the computer. In text files, each line of text end with a EOL (End of line) character and each file ends with a special character called the EOF (End of file). The file can be edited using text editors like C++ editor, notepad, vi editors in UNIX.

7.

Write an algorithm to reverse a singly linked list. 

Answer»

The algorithm to reverse a singly link list is as follows:-

reverse (struct node **st) 

{

struct node *p, *q, *r;

p = *st;

q = NULL;

while (p != NULL)

{

r =q;

q = p;

p = p link;

 link = r; 

}

*st = q;

}

8.

.......... searching is slower for larger array.

Answer»

Linear searching

9.

“Each element of the array is composed with value to be searched from the beginning of the array”. This method is adopted by ........... search.

Answer»

linear search

10.

......... search requires a sorted array as input.

Answer»

Binary search

11.

The array is divided into sorted part and unsorted part in .......... sort.

Answer»

The array is divided into sorted part and unsorted part in selection sort.

12.

Modular programming involves:1. Modules that solve individual tasks2. Processing from particular to general3. Problems decomposed into logical sub-problems1. 1, 2 and 32. 1 and 2 only 3. 1 and 3 only 4. 2 and 3 only 5.

Answer» Correct Answer - Option 3 : 1 and 3 only 

Explanation:

Modular programming is an approach to software development in which the individual functions of a program are separated into self-contained components called modules.

Each module contains everything necessary to fulfill its own functionality and can be edited and modified without the entire project being affected.

Modular programming is accomplished by maintaining a consistent module interface that other software components used to access each module's functions.[

They are designed in such a way as to minimize dependencies between different modules. Teams can develop modules separately and do not require knowledge of all modules in the system.

Languages that support the module concept are IBM Assembler, COBOL, RPG, FORTRAN, Morpho, Zonnon, and Erlang, among others.

The benefits of using modular programming include:

  1. Less code has to be written.
  2. A single procedure can be developed for reuse, eliminating the need to retype the code many times.
  3. Programs can be designed more easily because a small team deals with only a small part of the entire code.
  4. Modular programming allows many programmers to collaborate on the same application.
  5. The code is stored across multiple files.
  6. Code is short, simple, and easy to understand.
  7. Errors can easily be identified, as they are localized to a subroutine or function.
  8. The same code can be used in many applications.
  9. The scoping of variables can easily be controlled.
13.

A function can return more than one value by1. Passing parameters by value2. Using more than one ‘return’ statement in the function3. Passing parameters by reference4. Since a function can return only one value, this is not possible5.

Answer» Correct Answer - Option 3 : Passing parameters by reference

Explanation:

In C or C++, we cannot return multiple values from a function directly. 

We can return more than one value from a function by using the method called “call by address”, or “call by reference”.

In the invoker function, we will use two variables to store the results, and the function will take pointer-type data. So we have to pass the address of the data.

In pass-by reference (also called pass-by address), a copy of the address of the actual parameter is stored.

14.

Which of the following formulae can be used to add the contents of C2 and D3 in Lotus 1-2-3?1. C2 + D3,2. +C2 + D3,3. SUM (C2, D3),4. (C2 + D3)1. 1 and 2 2. 2 and 4 3. 1 and 3 4. 3 and 4 5.

Answer» Correct Answer - Option 2 : 2 and 4 

Explanation:

The Lotus 123 or 1-2-3 is a world famous package offering spreadsheet services to the users. It is designed by IBM, United States. It became popular as an application in the 1980s and it runs of Disk operating systems.

All the basic arithmetic operators have the conventional signs like

  • + → addition
  • - → subtraction
  • / → division
  • * → multiplication
  • ^ → exponentiation


In Excel, you start a formula with an equal sign (=). You can also start a formula with a plus sign (+), as you would in Lotus 1-2-3.

So for addition of contents of C2 and D3, we can use

+C2 + D3 or (C2 + D3) or @SUM(C2 : D3)  

15.

One Kilo Byte would be equal to – A. 1024 Bytes B. 1024 x 1024 Bytes C. 1 Mega Byte D. 1024 x 1024 x 1024 Bytes

Answer»

Correct answer is A. 1024 Bytes 

16.

Write the outputs of the SQL queries (i) to (iii) based on the relations Teacher and Posting given below:Table : TeacherT_IDNameAgeDepartmentDate_of_joinSalaryGender1Jugal34Computer Sc10/01/201712000M2Shaemila31History24/03/200820000F3Sandeep32Mathematics12/12/201630000M4Sangeeta35History01/07/201540000F5Rakesh42Mathematics05/09/200725000M6Shyam50History27/06/200830000M7Shiv Om44Computer Sc25/02/201721000M8Shalakha33Mathematics31/07/201820000FTable : PostingP_IDDepartmentPlace1HistotyAgra2MathematicsRaipur3Computer ScienceDelhii. SELECT Department, count(*) FROM Teacher GROUP BY Department; ii. SELECT Max(Date_of_Join),Min(Date_of_Join) FROM Teacher; iii. SELECT Teacher.name,Teacher.Department, Posting.Place FROM Teachr, Posting WHERE Teacher.Department = Posting.Department AND Posting.Place=”Delhi”;

Answer»

OUTPUT:

i. 

DepartmentCount(*)
History3
Computer Sc2
Mathematics3

ii. Max - 31/07/2018 or 2018-07-31 Min- 05/09/2007 or 2007-09-05 

iii. 

NameDepartmentPlace
JugalComputer ScDelhi
Shiv OmComputer ScDelhi

17.

Explain different types of arrays.

Answer»

There are two types of array 

1. Single dimensional: It contains only one index or subscript. The index starts from 0 and ends with size-1. 

eg: int n[50]; 

char name[10]; 

2. Multi-dimensional: 

It contains more than one index or subscript. The two dimensional array contains two indices, one for rows and another for columns. The row index starts from 0 and end at row size-1 and column index starts at 0 and ends at colunn size-1. 

eg: int n[10][10] can store 10 × 10 = 100 elements. The index of the first element is n[0][0] and index of the 100th element is n[9][9],

18.

Write down the corresponding memory consumption in bytes 1. int age[10] = .........2. charname[10] = ..........3. int age[10][10]= ...........

Answer»

1. 2 × 10 = 20 bytbs (2 bytes for one integer) 

2. 1 × 10 = 10 (one byte for each character) 

3. 2 × 10 ×10 = 200 (2 × (100 elements))

19.

Write a function in Python PUSH(Arr), where Arr is a list of numbers. From this list push all numbers divisible by 5 into a stack implemented by using a list. Display the stack if it has at least one element, otherwise display appropriate error message.

Answer»

Using of any correct code giving the same result is also accepted.

def PUSH(Arr,value): 

s=[]

for x in range(0,len(Arr)): 

if Arr[x]%5==0: 

s.append(Arr[x]) 

if len(s)==0:

print("Empty Stack") 

else: 

print(s)

20.

Mani wants to check a number from 100 numbers already stored in an array. This process is called ........... (a) insertion (b) deletion (c) searching (d) None of these

Answer»

(c) searching

21.

Write a function in Python POP(Arr), where Arr is a stack implemented by a list of numbers. The function returns the value deleted from the stack.

Answer»

def popStack(st) : 

# If stack is empty 

if len(st)==0: 

print("Underflow") 

else: 

L = len(st) 

val=st[L-1] 

print(val) 

st.pop(L-1)

22.

Anjali wants to read the 10 marks that already stored in an array and find the total. This process is known as ........(a) insertion (b) deletion (c) traversal (d) linear search

Answer»

(c) traversal

23.

Explain different array operations in detail.

Answer»

1. Traversal: All the elements of an array is visited and processed is called traversal 

2. Search: Check whether the given element is present or not 

3. Sorting: Arranging elements in an order is called sorting

24.

......... is the process of reading/visiting elements of an array.

Answer»

Traversal is the process of reading/visiting elements of an array.

25.

......... is a collection of elements with same datatype.

Answer»

Array is a collection of elements with same datatype.

26.

Read the following C++ statements: charstr[50];cin>>str;cout<<str;During execution, if the string given as input is “GREEN COMPUTING”, the output will be only the word “GREEN”. Give reason for this. What modification is required to get the original string as output?

Answer»

cin>>word;

cout<<word;

It displays “HAPPY” because cin takes characters upto the space. That is space is the delimiter for cin. The string after space is truncated. To resolve this use gets() function. 

Because gets() function reads character upto the enter key. 

Hence gets(word); 

puts(word); 

Displays “HAPPY NEW YEAR”

27.

In plants which is present for gases exchange.(a) Root (b) Stomata (c) Stem (d) Flower

Answer»

In plants Stomata is present for gases exchange.

28.

You have used a 2D array with the Name Mat representing a matrix. Write the C++ expression to access the 3rd element in the 2nd row.

Answer»

Answer is mat[1] [2];

29.

Read the following C++ statement: 1. How many bytes will be allocated for this array? 2. Write algorithm to sort this array using bubble sort method.

Answer»

1. To store an integer 4 bytes needed so 

AR[10] needs 10 × 4 = 40 bytes. 

2. Sorting – Arranging elements of an array in an order(ascending or descending). 

(a) Bubble sort: 

It is a simple sorting method. In this sorting considering two adjacent elements if it is out of order, the elements are interchanged. After the first iteration the largest(in the case of ascending sorting) or smallest(in the case of descending sorting) will be the end of the array. This process continues.

(b) Selection sort: 

In selection sort the array is divided into two parts, the sorted part and unsorted part. First smallest element in the unsorted part is searched and exchanged with the first element. Now there is 2 parts sorted part and unsorted part. This process continues.

30.

Wings of bind and bat are - (a) Homologous Organ (b) Analogous Organ (c) Vestigal Organ (d) None of above

Answer»

Wings of bind and bat are Homologous Organ. 

31.

Which one is producer as given below :-(a) Snake (b) Grass (c) Frog (d) Lion

Answer»

Grass is the producer.

32.

From the following select the input operator. a)&gt;&gt; b)&lt;&lt; c) &gt;d) &lt;

Answer»

>> is the input operator.

33.

From the following select the output operator. a)&gt;&gt;b)&lt;&lt;c) &gt; d) &lt;

Answer»

<< is the output operator. 

34.

For autotrophic nutrition &amp; necessary material is -(a) Carbon dioxide(b) chlorophyll (c) Sunlight (d) Above all

Answer»

For autotrophic nutrition & necessary material are Carbon dioxide, chlorophyll and Sunlight.

35.

Differentiate between Serosa and Lumen.

Answer»

The outermost layer of the wall of alimentary canal is called serosa. The inner hollow space in the alimentary canal is called lumen.

36.

Pick the hexa decimal integer from the following a) 217 b) 0x217 c)0217 d) None of these

Answer»

b) 0x217, an hexa decimal integer precedes Ox.

37.

Non graphic symbol can be represented by using ............

Answer»

Escape Sequence

38.

State True/ False a string is automatically appended by a null-character.

Answer»

The statement is True.

39.

From the following pick a string constant. a) ‘a’ b) “abc” c) ‘abc’ d) None of these

Answer»

“abc”, a character constant must be enclosed between double quotes.

40.

Consider the following C = A + B. Here A and B are called(a) Operand (b) Operator (c) Variable (d) None of these,

Answer»

Here A and B are called Operand.

41.

C++ was developed by ....... a) Bjarne stroustrupb) James Gosling c) Pascal d) None of these

Answer»

a) Bjarne stroustrup

42.

From the following pick a character constant a)’A’ b)’ALL c)’AIM’ d) None of these

Answer»

a) ‘A’, a character enclosed between single quote

43.

If y = cos(log x), then dy/dx = (a) -sin(log x)(b) (-sin(log x))/x(c) (cos(log x))/x(d) -sin(log x).log x

Answer»

Answer is (b) (-sin(log x))/x

44.

If y = x3, then d2y/dx2 =(a) 3x2(b) 6x(c) 6(d) 0

Answer»

Answer is (b) 6x

45.

A bag contains 30 white balls and 10 red balls. 16 balls are drawn one by one randomly from the bag with replacement. If X be the number of white balls drawn, then (mean of X/standard deviation of X)  is equal to :(1)   4√3(2)  4√3/3(3)  4(4)   3√2

Answer»

Correct option  (1)   4√3

Explanation:

Probability of getting a white ball = 30/40 = 3/4

Probability of getting a red ball =10/40 = 1/4

n = 16

Mean = np and variance = npq

So mean = 16.3/4 and s.d. = √16.3/4.1/4

So mean = 12 and s.d. = √3

so mean of x/s.d of x = 12/√3 = 4 x 3/√3 = 4√3

46.

∫x8 dx = (a) 8x7 + k(b) (x8/8) + k(c) x9 + k(d) (x9/9) + k

Answer»

Answer is (d) (x9/9) + k

47.

The integration of 0 with respect to x is :(a) 0(b) k(c) x + k(d) x2 + k

Answer»

Answer is (a) 0

48.

∫dx/(1 - sin x) = 

Answer»

Answer is (b) tan x + sec x + k

49.

The solution of the differential equation dy/dx = e(x + y) is :

Answer»

Answer is (a) ex + e-y + k = 0

50.

The integrating factor of the linear differential equation (dy/dx) + Py = Q(a) e∫P dy (b) e∫Q dx(c) e∫Q dy(d) e∫P dx

Answer»

Answer is (d) e∫P dx