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.

51.

Which of the following is the assignment operator?(a) (c) =(d) ==The question was posed to me by my school teacher while I was bunking the class.The query is from Getting Started with R topic in section Sockets of JavaScript

Answer»

Correct choice is (a) <-

For EXPLANATION: The OPERATORS <- and = can be used, almost interchangeably, to assign to a variable in the same environment. The assignment operator is a left-pointing arrow, so creating and declaring variables LOOKS like this:

FOO

52.

Which of the following is a successor to the S language?(a) C++(b) R(c) S(d) JavaThe question was asked in class test.The question is from Getting Started with R in portion Sockets of JavaScript

Answer»

The correct option is (B) R

Best explanation: R is a programming language and FREE software environment for statistical computing and GRAPHICS supported by the R FOUNDATION for Statistical Computing. R is an extension of and successor to the S language, which was itself a statistical language.

53.

How will you update the URL displayed in the location bar?(a) location(b) location.URL(c) location.hash(d) urlI have been asked this question in unit test.I want to ask this question from History Management in JavaScript topic in chapter Sockets of JavaScript

Answer»

The correct option is (c) location.hash

To elaborate: The hash property sets or returns the anchor PART of a URL, including the hash sign (#). The property location.hash needs to be UPDATED to display the updated URL in the location BAR.

54.

How will you convert the returned API into an XML object?(a) SimpleElement()(b) SimpleXMLElement()(c) XMLElement()(d) CovertXML()This question was addressed to me in a national level competition.This question is from Accessing the WebPagetest API in portion Sockets of JavaScript

Answer»

The CORRECT option is (B) SimpleXMLElement()

For explanation I would say: file_get_contents() is the preferred way to read the CONTENTS of a file into a string. It will USE MEMORY mapping techniques if supported by your OS to enhance performance. The API returned by the method file_get_contents() can be converted into an XML object using the method SimpleXMLElement().

55.

Which of the following comes with tools to build your own R packages?(a) Contrib(b) Base(c) Rtools(d) RBaseThis question was posed to me in unit test.This interesting question is from Getting Started with R in section Sockets of JavaScript

Answer»

Correct option is (c) RTOOLS

The best I can explain: Rtools provide the tools to build R and R packages. The PC INSTALLER comes in THREE flavors: Base is the base install, Contrib comes with compiled third-party packages, and Rtools comes with tools to build your own R packages.

56.

Which symbol is used to start a comment?(a) /(b) $(c) #(d) ?The question was posed to me in exam.The question is from Getting Started with R in chapter Sockets of JavaScript

Answer»

Right answer is (c) #

EXPLANATION: ‘#’ is USED to COMMENT a LINE. A single line comment can be MADE in R.

57.

What are the processes that take place within R?(a) Splitting of data(b) Aggregating of data(c) Overlaying two or more data(d) All of the mentionedThe question was posed to me in unit test.The origin of the question is Getting Started with R topic in section Sockets of JavaScript

Answer»

Right choice is (d) All of the mentioned

Explanation: R is an integrated suite of software facilities for data manipulation, CALCULATION and graphical DISPLAY. Within R, processing the data, splitting it, averaging it, aggregating it, OVERLAYING TWO or more data sets, and then from with R, a chart that depicts the data out is done.

58.

Which of the following is not a socket property?(a) onopen(b) readyState(c) onmessage(d) readyI got this question in an internship interview.This intriguing question comes from Web Sockets topic in division Sockets of JavaScript

Answer» CORRECT choice is (d) ready

Explanation: There is no Socket property called ready. VARIOUS Socket properties INCLUDE onopen, READYSTATE, ready, binaryTree, onclose, onerror etc.
59.

What is the purpose of the file_get_contents()?(a) To get the errors and exceptions(b) To get the client’s response(c) To get the server’s response(d) To get the dataI got this question in my homework.I need to ask this question from Accessing the WebPagetest API topic in section Sockets of JavaScript

Answer»

The CORRECT answer is (c) To get the server’s response

For explanation I WOULD SAY: The file_get_contents() is a PHP’s native function USED to hit the URL and read the server’s response into

a variable $wpt_response:

60.

What is the purpose of the method symbols in R?(a) Draw symbols(b) Draw other shapes(c) Draw symbols and other shapes(d) Plotting symbolsI have been asked this question in my homework.This interesting question is from Enhanced JavaScript with R topic in chapter Sockets of JavaScript

Answer»

The correct option is (B) Draw other shapes

The best EXPLANATION: The symbols() function can be used to draw other shapes on a PLOT; for more information about this type ?symbols at the R console. One of six symbols; circles, squares, rectangles, stars, thermometers, and boxplots, can be plotted at a specified set of X and y coordinates.

61.

What is the limit to matrices in R?(a) One dimensional(b) Two dimensional(c) Three dimensional(d) No limitThe question was posed to me in my homework.I would like to ask this question from Getting Started with R in division Sockets of JavaScript

Answer»

The correct answer is (b) Two dimensional

For EXPLANATION I would say: Matrices are like strictly TYPED two-dimensional arrays. You create a matrix using the matrix FUNCTION, which accepts five parameters: a vector to use as the CONTENT, the number of rows to shape the content into, the number of columns to shape the content into, an optional boolean value to indicate whether the content should be shaped by row or by column (the default is FALSE for by column), and a list that contains VECTORS for row names and column names:

matrix([content vector], nrow=[number of rows], ncol=[number of columns], byrow=[how to sort], dimnames=[vector of row names, vector of column names]).

62.

Which of the following is the base install for R?(a) Contrib(b) Base(c) Rtools(d) RBaseThe question was asked during an internship interview.This is a very interesting question from Getting Started with R in division Sockets of JavaScript

Answer»

The correct answer is (b) Base

To elaborate: Base is the binaries for base DISTRIBUTION. The PC INSTALLER COMES in three flavors: Base is the base install, Contrib comes with COMPILED third-party packages, and Rtools comes with tools to build your own R packages.

63.

How many WebSocket events are available?(a) 2(b) 3(c) 4(d) 5The question was asked in an international level competition.Origin of the question is Web Sockets in division Sockets of JavaScript

Answer» CORRECT OPTION is (c) 4

To elaborate: Web SOCKETS are defined as a two-way communication between the servers and the clients, which mean both the parties, communicate and exchange data at the same time. There are fourWebSocket EVENTS NAMELY:

open

close

message

error