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.

What will be the output of runif()?(a) Random number(b) Numbers(c) Character(d) Path generation

Answer» Correct choice is (a) Random number

The best explanation: Random numbers from a normal distribution can be generated using runif() function. We can specify the range of the uniform distribution with the help of max and min argument. If not provided, the default range will be between 0 and 1.
2.

What is the data type of the array subscript?

Answer»

The data type of the array subscript is integer or int.

3.

What are global variables?

Answer»

A variable that is declared outside any function is known as a global variable.

4.

Name the data type of the array subscript.

Answer»

The data type of array subscript is integer or int.

5.

What is selection statement?

Answer»

The Selection statements are used to execute certain block of statements after evaluating the condition.

6.

Find the subtriplicate ratio of 125 : 64.

Answer»

Subtriplicate ratio of 125 : 64 

= 3√125 : 3√64 = 5 : 4.

7.

What is nested -if statement?

Answer»

An if statement nestling inside another ‘if’ statement is termed as ‘a nested if’ statement. 

8.

Point out the correct statement?(a) Rprofiler() tabulates how much time is spent inside each function(b) Rprof() keeps track of the function call stack at regularly sampled intervals(c) By default, the profiler samples the function call stack every 2 seconds(d) R must not be compiled with profiler support

Answer» The correct answer is (b) Rprof() keeps track of the function call stack at regularly sampled intervals

Easy explanation: The profiler is started by calling the Rprof() function.
9.

Point out the wrong statement?(a) The order of the packages on the search list does not matter(b) R has separate namespaces for functions and non-functions(c) Users can configure which packages get loaded on startup so if you are writing a function(d) The search list can be found by using the search() function

Answer» The correct choice is (a) The order of the packages on the search list does not matter

For explanation I would say: The order of the packages on the search list matters, particularly if there are multiple objects with the same name in different packages.
10.

What is the data type of an array subscript?

Answer»

The data type of array subscript is integer or int.

11.

Give the usage of end1 function.

Answer»

A manipulator is a C++ is used to control the formatting of output and/or input values. Manipulators can only be present in input/output statements. The end1 manipulator causes a newline character to be output end1 is defined in the header file and can be used as long as the header file has been included.

12.

Define Banker’s Discount.

Answer»

Banker’s Discount is the Simple interest calculated by the banker on the face value of the bill i.e., BD = Ftr

13.

______ suspends the execution of a function wherever it is called and puts the function in debug mode.(a) debug()(b) trace()(c) recover()(d) browser()

Answer» Correct choice is (d) browser()

To elaborate: The debug() function initiates an interactive debugger (also known as the “browser” in R) for a function.
14.

Which function basically finds the intersection between two different sets of data?(a) Converge(b) Merge(c) Delegate(d) Swap

Answer» The correct option is (b) Merge

The explanation is: Merge () function is used to combine two data frames and it identifies common rows or columns between the 2 data frames. Merge () function basically finds the intersection between two different sets of data.
15.

What is a compound statement?

Answer»

A compound statement is a grouping of statements enclosed between the pair of flower braces ({}) in which each individual statement ends with a semi-colon.

16.

How do you initialize one dimensional array? 

Answer»

int marks[6] = { 91,96,90,94,99,93};

17.

Find the equation of the circle with centre ‘C and radius ‘r’ of the following: c(-3, 2) and r = 5 units

Answer»

Given C(-3, 2) r = 5 units

x1 y1

Equation of the circle is(x – x1)2 + (y – y1)2 = r2

x - (-3))2 + (y – 2)2 = 52

(x + 3)2 + (y – 2)2 = 52 

x2 + y2 + 6x – 4y – 12 = 0.

18.

_________ is an indication that a fatal problem has occurred and execution of the function stops.(a) message(b) error(c) warning(d) message & warning

Answer» Right option is (b) error

The explanation: Errors are produced by the stop() function.
19.

What is the purpose of end1?

Answer»

The purpose of end1 is to break the line in output statement. 

20.

What is the difference between = and == operators?

Answer»

The = is an assignment operator and == is a relational operator. 

21.

_______ allows you to modify the error behavior so that you can browse the function call stack(a) debug()(b) trace()(c) recover()(d) traceback()

Answer» Correct answer is (c) recover()

Explanation: The recover() function can be used to modify the error behavior of R when an error occurs.
22.

Which function in R language is used to find out whether the means of 2 groups are equal to each other or not?(a) f.tests ()(b) l.tests ()(c) t.tests ()(d) not exist

Answer» The correct choice is (c) t.tests ()

To explain I would say: t.tests () function in R language is used to find out whether the means of 2 groups are equal to each other. It is not used most commonly in R. It is used in some specific conditions.
23.

What are local variables?

Answer»

The variables declared within a function block are called local variables.

24.

Find lim(x→4) ((4x + 3)/(x - 2))

Answer»

= (4.4 + 3)/(4 - 2) = (16 + 3)/2 = 19/2

25.

Define coding.

Answer»

The process of algorithmic solution or flowchart solution into a set of instructions in a programming language is called as coding. 

26.

Define mail merge.

Answer»

Mail merge is a process helps to generate letters by combing contents of one document with the content of addresses.

27.

MapReduce jobs submitted from either Oozie, Pig or Hive can be used to encode, improve and sample the data sets from _________ into R.(a) HDLS(b) HDFS(c) HDLSV(d) HSSLV

Answer» Correct choice is (b) HDFS

The explanation is: MapReduce jobs submitted from either Oozie, Pig or Hive can be used for encode, improve and sample the data sets from HDFS into R. This helps to leverage complex analysis tasks with the subset of data prepared in R.
28.

__________ prints out the function call stack after an error occurs.(a) trace()(b) traceback()(c) back()(d) traback()

Answer» Right choice is (b) traceback()

The best explanation: traceback() does nothing if there’s no error. trace() Interactive tracing and debugging of calls to a function or method.
29.

R code can be tested using _________________ package.(a) Dplyr(b) Hadley’s testthat(c) SKLearn(d) KNN

Answer» Right option is (b) Hadley’s testthat

Easiest explanation: R code can be tested using Hadley’s testthat package. Testthat draws inspiration from the xUnit family of testing packages, as well as from many of the innovative ruby testing libraries.
30.

What is a cell in ESS?

Answer»

The intersection of a row and a column in a spread sheet is called a cell.

31.

Expand OCR.

Answer»

Optical Character Reader/Recognition.

32.

write an equivalent java expression for the following expression : [ 3x+5y/5x+3y-8xy/2yx]3/2

Answer» Math.pow [(3*x+5*y/5*x+3*y-8*x*y/2*y*x)](3/2)
33.

Who invented Pascaline?

Answer»

A French philosopher Blaise Pascal invented “pascaline” the first mechanical calculator. 

34.

Write a note on pascaline.

Answer»

The Gottfried Wilhelm Leibniz invented machine had addition, subtraction, multiplication, and division calculators whereas Pascaline had only an addition calculator.

35.

What is dynamic memory allocation? Explain the various memory allocation function with its task.

Answer»

The mechanism of allocating required amount of memory at run time is called dynamic allocation of memory. Sometimes it is required to allocate memory at runtime. When we declare array in any program, the compiler allocates memory to hold the array. Now suppose the numbers of items are larger than the defined size then it is not possible to hold all the elements and if we define an array large enough and data to be stored is less, in that case the allocated memory is wasted leading to a need for dynamic memory allocation. In this mechanism we use a pointer variable to which memory is allocated at run time.

The various memory allocation functions are described below:

(i) malloc( ): It is a memory allocation function that allocates requested size of bytes and returns a pointer to the first byte of the allocated space. The malloc function returns a pointer of type void so we can assign it to any type of pointer. It takes the the following form: 

ptr= (cast type *) malloc(byte-size);

where ptr is a pointer of type cast-type. For example, the statement

x=(int *) malloc(10 *sizeof(int)) means that a memory space equivalent to 10 times the size of an int byte is reserved and the address of the first byte of memory allocated is assigned to the pointer x of int type.

The malloc function can also allocate space for complex data types such as structures. For example: 

ptr= (struct student*) malloc(sizeof (struct student)); where ptr is a pointer of type struct student. 

(ii) calloc( ): It is another memory allocation function that allocates space for an array of elements, initializes them to zero and then returns a pointer to the memory. This function is normally used for requesting memory space at run time. While malloc allocates a single block of storage space, calloc allocates multiple block of storage, each of the same size, and then sets all bytes to zero. It takes the following form:  

ptr= (cast type *) calloc(n,element-size);

This statement allocates contiguous space for n blocks, each of size element-size bytes.

(iii) realloc( ): realloc is a memory allocation function that modifies the size of previously allocated space. Sometime it may happen that the allocated memory space is larger than what is required or it is less than what is required. In both cases, we can change the memory size already allocated with the help of the realloc function known as reallocation of memory. For example, if the original allocation is done by statement.

ptr= malloc(size);

then reallocation is done by the statement

ptr=realloc(ptr,newsize); which will allocate a new memory space of size newsize to the pointer variable ptr and returns a pointer to the first byte of the new memory block

36.

Who Invented the Pascaline?

Answer»

French Philosopher Blaise Pascal invented the Pascaline. 

37.

Mention different features of MS excel.

Answer»

The different features of MS excel is as follows;

1. Excel Charts: Excel provides a vast number of chart types and options.

2. Formulas and Functions: Another great feature of Excel is the ability to embed formulas into cells to calculate data. In addition, an impressive list of built-in functions is provided that can be used to summarize data.

3. Cell Formatting: You can customize the formatting of a cell or range of cells. You can apply borders, cell background color, font size and color, number formatting and much more.

4. Sorting and Filtering: You can reorder the data or pick out just the data you need, based on parameters you set within Excel. Sorting and filtering your data will save you time and make your spreadsheet more effective.

5. Pivot Tables: Summarise large amounts of Excel data from a database that is formatted where the first row contains headings and the other rows contain categories or values.

Other features are: 

  • Create and manipulate simple (flat-file) databases
  • Establish relationships between sets of numerical data
  • Apply arithmetic, mathematical or statistical functions to numerical datasets 
  • Represent datasets in graphical or chart form
38.

What is HTML? Give the general structure of HTML.

Answer»

HTML is a markup language for describing web documents (web pages).

The general structure of HTML is as given below;

<HTML>

<HEAD>

<TITLE> Welcome to HTML Page </TITLE>

</HEAD>

<BODY> <CENTER>

<H1> Welcome to the World of Web Paging </H1>

</CENTER>

</BODY>

</HTML>

 A Web Page is marked by an opening HTML tag and a closing tag. The head section is defined with a starting tag and a closing tag. This section is usually contains a title for the Web Page. The text enclosed in the tags will appear in the title bar of the Web Browser when it displays the page.

The tag contains the entire information about the Web Page and its behavior. We can set up many options to indicate how our page must appear on the screen (like colour, location, etc..)

39.

When a compiler can automatically generate a constructor if it is not defined then why is it considered that writing constructor for a class is a good practice? 

Answer»

When an object of the class is created a compiler can automatically generates a constructor if it is not defined. It is considered that writing constructor for a class is a good practice because constructor takes over very important duty of initialization of an object being created and relieves us from this task.

40.

What do you think is the advantage of declaring the constructor and destructor functions for public member access?(i)  It allows the constructor and destructor access to the data members.(ii)  It means that the constructor and destructor can be called directly by code in main() functions.(iii) It allows the constructor access to the other member functions.(iv)  None of the above.

Answer»

(ii) It means that the constructor and destructor can be called directly by code in main() functions. 

41.

‘Accessibility of a constructor or a destructor greatly affects the scope and visibility of their class’. Elaborate this statement

Answer»

Generally, a constructor and destructor should be defined under the public section of a class, so that its objects can be created and destroyed in any function. A private or protected constructor/destructor is not available to the nonmember functions. Thus, accessibility of a constructor or a destructor greatly affects the scope and visibility of their class.

42.

Answer the question (i) and (ii) after going through the following class:class Exam{  int Rno,MaxMarks,MinMarks,Marks; public:Exam() //Module 1{  Rno=101; MaxMarks=100;MinMarks=40;Marks=75;}Exam(int Prno,int Pmarks) //Module 2{ Rno=Prno; MaxMarks=100;MinMarks=40;Marks=Pmarks;}~Exam() //Module 3{ cout&lt;&lt;"Exam Over"&lt;&lt;end1;}void Show() //Module 4{ cout&lt;&lt;Rno&lt;&lt;":"&lt;&lt;MaxMarks&lt;&lt;":"&lt;&lt;MinMarks&lt;&lt;end1;cout&lt;&lt;"[MarksGot]"&lt;&lt;Marks&lt;&lt;end1; };(i)  As per Object Oriented Programming, which concept is illustrated by Module 1 and Module 2 together? (ii)  What is Module 3 referred as? When do you think, Module 3 will be invoked/called?

Answer»

(i) Constructor overloading.

(ii) Destructor. It will be invoked when scope of an object gets over.

43.

Describe the importance of destructor. List some of the special properties of destructor.

Answer»

A object that is existing must be scrapped off when it is o more needed. The task of scrapping off an object is carried out by a destructor. A destructor deinitializes an object and deallocates all allocated resources. Properties of destructor:

  • Destructor functions are invoked automatically when the objects are destroyed. 
  • There can be only one destructor for a class, means destructor can’t be overloaded.
  • No argument can be provided to a destructor, neither does it returns any value.
44.

An ion with mass number `56` contains `3` units of positive charge and `30.4%` more neutrons then electrons. Assign the symbol to this ion.

Answer» Suppose number of electrons in the ion, `M^(3+)=x`
`:.` Number of neutrons `=x+30.4/100x=1.304x`
Number of electrons in the neutral atom `=x+3`
`:.` Number of protons `=x+3`
Mass number=Number of protons+Number of neutrons
`56=x+3+1.304x`
or `2.304x=53` or `x=23`
`:.` Number of protons=Atomic no. `=x+3=23+3=26`
Hence, the symbol of the ion will be `._(26)^(56)Fe^(3+)`.
45.

India-based Neutrino Observatory is included by the planning commission as a mega-science project under the 11th Five-year plan. In this context, consider the following statements :1. Neutrinos are chargeless elementary particles that travel close to the speed of light.2. Neutrinos are created in nuclear reactions of beta decay.3. Neutrinos have a negligible, but non-zero mass.4. Trillions of Neutrinos pass through the human body every second.Which of the statements given above are correct?1. 1 and 3 only2. 1, 2 and 3 only3. 2, 3 and 44. 1, 2, 3 and 4

Answer» Correct Answer - Option 4 : 1, 2, 3 and 4

The correct answer is 1, 2, 3 and 4.

  • Neutrino is an elementary subatomic particle with no electric charge, very little mass, and 1/2 unit of spin.
  • A neutrino is an elementary particle that usually travels close to the speed of light. Hence, Statement 1 is correct.
  • It is electrically neutral and is able to pass through ordinary matter almost undisturbed.
  • Neutrinos are created in nuclear reactions of beta decay.  Hence, Statement 2 is correct.
  • Neutrino has a very tiny mass, no charge, and spins half. Hence Statement 3 is correct.
  • It interacts very weakly with other matter particles so weakly that every second trillion of neutrinos fall on us and pass through our bodies unnoticed. This makes neutrinos extremely difficult to detect. Hence Statement 4 is correct.
  • Neutrinos have a very small, but nonzero rest mass.
  • Neutrinos are affected only by a weak sub-atomic force of a much shorter range than electromagnetism and are therefore able to pass through great distances in matter without being affected by it.

  • Some important aspects of the 11th Five-year plan (2007-2012).
    • The average annual economic growth rate of 8%.
    • The farm sector grew at an average rate of 3.7% as against the 4% targeted.
    • The industry grew with an annual average growth of 7.2% against the 10% targeted.
    • Objective:-
      • Rapid and inclusive growth.
      • Empowerment through education and skill development.
      • Reduction of gender inequality.
      • Environmental sustainability.
46.

How many significant numbers are there in  (2.30 + 4.70) × 105 ? (a) 3             (b) 4             (c) 2             (d) 5

Answer»

(a) 3 

Explanation:

 (2.30 + 4.70) × 105 = (7.00) × 105 

Trailing zeros in a number containing decimal point are significant also  power of 10 doesn’t add to significant figure 

 Hence number of significant figure = 3   

47.

You are familiar with different chemical reactions of hydrocarbons. Identify the situations in daily life in which these are used.

Answer»

a. Substitution Reaction : Chloroform, CCl4 preparation 

b. Addition Reaction : Conversion of unsaturated compounds into saturated. 

c. Combustion: Preparation of polymers like PVC. 

d. Thermal Cracking: Butane (LPG)can be prepared from higher hydrocarbons

48.

Which of the given molecules can form polymers ? Butane, Propane, Propane, Methane, Butene.

Answer»

Propene, Butene

49.

After completing the chemical reactions write down to which category they belong. a. CH2Cl + Cl2 → …….. + HCl b. CH = CH + H2 →………… c. CH4 + 2O2 → …….. + H2O d. CH3 – CH2 – CH3 →

Answer»

a. CH2Cl + Cl2 → CH2Cl2 + HCl Substitution reaction 

b. CH = CH + H2 → CH2 = CH2 Addition Reaction

c. CH4 + 2O2 → CO2 + H2O Combustion 

d. CH3 – CH2 – CH3 → CH2 = CH2 + CH2 + CH4 Thermal cracking

50.

Analyze the given reactions and answer the following questions.a. Identify A and B b. What is the name of reaction by which ‘B’ is formed?

Answer»

a. A – CH2 = CH2 , B – CH3Cl 

b. Substitution reaction