Javascript MCQ Set 1
1. What is the usage of the keyword ?? in R?
a) Help window
b) Extensive search
c) Error correction
d) Error detection
Answer
Answer: b [Reason:] ?? (keyword) is generally used for a more extensive search when compared to the keyword ?.
2. Which type of comment is not supported in R?
a) Single-line comments
b) Multi-line comments
c) Both Single-line & Multi-line comments
d) None of the mentioned
Answer
Answer: b [Reason:] R supports single-line comments, but not multiline comments.
3. What is the usage of the keyword ? in R?
a) Help window
b) Extensive search
c) Error correction
d) Error detection
Answer
Answer: a [Reason:] ? is generally used to open the help window at any time.
4. Which symbol is used to start a comment?
a) /
b) $
c) #
d) None of the mentioned
Answer
Answer: c [Reason:] ‘#’ is used to comment a line.
5. Which of the following is the assignment operator?
a) <-
b) ->
c) =
d) ==
Answer
Answer: a [Reason:] The assignment operator is a left-pointing arrow, so creating and declaring variables looks like this:
foo <- bar
6. Which of the following is a loosely-typed language?
a) R
b) T
c) S
d) Both R and S
Answer
Answer: c [Reason:] R and S are loosely-typed languages and it supports all of the scalar data types you would expect: string, numbers, and booleans.
7. What is the limit to matrices in R?
a) One dimensional
b) Two dimensional
c) Three dimensional
d) No limit
Answer
Answer: b [Reason:] 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]).
8. Which is the function used to add the vectors?
a) c()
b) add(vectors)
c) c(vectors)
d) vectors.add
Answer
Answer: a [Reason:] The c() function is used to add the vectors.
9. Which of the following list contains multiple data types?
a) Vectors
b) Data frames
c) Matrices
d) None of the mentioned
Answer
Answer: b [Reason:] Data frames are multidimensional lists that can contain multiple data types.
10. Which function is used to create data frames?
a) data.frames()
b) frame.data()
c) data.frame()
d) frame(data)
Answer
Answer: c [Reason:] The data frames can be created using the data.frame() function which accepts a number of vectors as content, and then the following parameters : row.names to specify the vector to use as row identifiers, check.rows to check consistency of row data, and check.names to check for duplicates among other syntactical checks.
Javascript MCQ Set 2
1. How many properties are available in a memory object?
a) 1
b) 2
c) 3
d) 4
Answer
Answer: c [Reason:] There are a total of 3 memory objects namely :
- jsHeapSizeLimit
- totalJsHeapSize
- usedJsHeapSize.
2. What is a heap in JavaScript?
a) Collection of Java objects
b) Collection of JavaScript objects
c) Collection of memory usage values
d) Collection of data stored in memory
Answer
Answer: b [Reason:] The heap is the collection of JavaScript objects that the interpreter keeps in resident memory.
3. What is the function of the memory object?
a) Gets unused memory details
b) Shows optimization
c) Gets memory usage
d) None of the mentioned
Answer
Answer: c [Reason:] The memory object is a feature of Chrome that allows us to see the memory usage that Chrome is taking up while running our page.
4. What is the command to access the Heap size limit?
a) performance.memory. SizeLimit
b) performance.memory. jsHeapSizeLimit
c) jsHeapSizeLimit
d) performance.jsHeapSizeLimit
Answer
Answer: b [Reason:] The command performance.memory. jsHeapSizeLimit is used to access the Heap size limit.
5. What is the purpose of garbage collection?
a) Removes object with many reference
b) Removes object with reference
c) Removes object with invalid reference
d) Removes object with no reference
Answer
Answer: d [Reason:] When the interpreter sees an object in the heap with no object references, it removes that object from the heap. This is called garbage collection.
6. What does the usedJsHeapSize property indicate?
a) Amount of memory used
b) Amount of memory unused
c) Amount of memory used & unused
d) None of the mentioned
Answer
Answer: a [Reason:] The usedJsHeapSize property is the amount of memory that all of the current objects in the heap are using.
7. Which of the following property indicate the total size of heap?
a) heapSize
b) totalHeapSize
c) totalJsHeapSize
d) totalHeap
Answer
Answer: c [Reason:] The totalJsHeapSize is size of the heap including free space not used by objects.
8. What can be done to monitor the memory usage?
a) Profiling
b) Sequencing
c) Serializing
d) None of the mentioned
Answer
Answer: a [Reason:] Profiling allows us to monitor our memory usage.
9. Which of the following gives the high level breakdown of memory usage?
a) about:memory
b) memory
c) about-memory
d) about::memory
Answer
Answer: a [Reason:] Typing about:memory into the location bar brings up a page that gives a high-level breakdown of memory usage.
10. Which keyword must be used to get a more granular insight of the memory usage?
a) verb
b) verbose
c) granule
d) none of the mentioned
Answer
Answer: b [Reason:] To get a more granular insight of the memory usage, we must type about:memory?verbose.
Javascript MCQ Set 3
1. What kind of data can be run in R?
a) Binary
b) Text
c) Decimals
d) All kinds
Answer
Answer: d [Reason:] All kinds of data can be run in R.
2. Which of the following is/are the features of R?
a) Small
b) Self-contained
c) Extensible
d) All of the mentioned
Answer
Answer: d [Reason:] As a language, R is small, self-contained, extensible, and just fun to use.
3. What is the advantage for Linux users using R?
a) They get a command sequence to install the particular Linux flavor
b) They get a compiled installer
c) All of the mentioned
d) None of the mentioned
Answer
Answer: a [Reason:] Instead of a compiled installer, Linux users get the command sequence to install for their particular Linux flavor.
4. Which of the following is the base install for R?
a) Contrib
b) Base
c) Rtools
d) None of the mentioned
Answer
Answer: b [Reason:] 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.
5. Which of the following comes with compiled third-party packages?
a) Contrib
b) Base
c) Rtools
d) None of the mentioned
Answer
Answer: a [Reason:] 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.
6. Which of the following comes with tools to build your own R packages?
a) Contrib
b) Base
c) Rtools
d) None of the mentioned
Answer
Answer: c [Reason:] 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.
7. The code of the R language has an extension?
a) .Rl
b) .R
c) .lR
d) .RR
Answer
Answer: b [Reason:] The code of the R language has an extension .R.
8. Which of the following is used to run ad hoc R commands?
a) R Console
b) R Primer
c) Both R Console and R Primer
d) None of the mentioned
Answer
Answer: a [Reason:] The R Console is a command-line environment for running ad hoc R commands.
9. Which is the keyword used to open the Help window?
a) ()
b) #
c) ?
d) =
Answer
Answer: c [Reason:] At any time, you can type ?(keyword) to open the help window for a particular subject.
10. For a more extensive search, which keyword needs to be used?
a) ??
b) ?
c) ?=
d) =?
Answer
Answer: a [Reason:] For a more extensive search, just type ?? (keyword).
Javascript MCQ Set 4
1. What is the purpose of the method createDocumentFragment()?
a) Creates a fragment object
b) Creates a document fragment
c) Creates imaginary node object
d) None of the mentioned
Answer
Answer: c [Reason:] The createDocumentFragment() method creates a imaginary Node object, with all the properties and methods of the Node object.
2. What is the default value of the asyc attribute?
a) 0
b) 1
c) False
d) True
Answer
Answer: d [Reason:] The async attribute optionally accepts a boolean value and by default holds the value true.
3. What is the method to create a data frame ?
a) frame(data)
b) frameData()
c) data.frame()
d) none of the mentioned
Answer
Answer: c [Reason:] The method to create a data frame is data.frame().
4. What is the purpose of creating a data frame?
a) Hold the page render time
b) Hold the load time
c) Hold the page render time & load time
d) None of the mentioned
Answer
Answer: c [Reason:] You can create a data frame to hold the mean page render times for each test URL, and a data frame to hold the mean load time for each test URL.
5. Which of the following navigator object properties is the same in both Netscape and IE?
a) navigator.appCodeName
b) navigator.appName
c) navigator.appVersion
d) none of the mentioned
Answer
Answer: a [Reason:] The property navigator.appCodeName is the same in both Netscape and IE.
6. Which best explains getSelection()?
a) Returns the VALUE of a selected OPTION
b) Returns document.URL of the window in focus
c) Returns the value of cursor-selected text
d) Returns the VALUE of a checked radio input
Answer
Answer: c [Reason:] The getSelection() method returns the value of the cursor-selected text.
7. Which of the following are client-side JavaScript object?
a) Database
b) Cursor
c) Client
d) FileUpLoad
Answer
Answer: d [Reason:] The FileUpLoad is a client-side JavaScript object.
8. What is the purpose of the method localeCompare()?
a) If the reference string comes before or after another string
b) If the reference string is validated
c) If the string is a reference string
d) None of the mentioned
Answer
Answer: a [Reason:] The method localeCompare() returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
9. When the “end” event fires on EOF when no more data will arrive, which function is called?
a) s.on("data",f); b) s.on("end",f); c) s.on("error",f); d) s.on("default",f);
Answer
Answer: b [Reason:] The above code snippet gets “end” event fired on EOF when no more data will arrive.
10. To define each of the set classes as a property of the sets object (namespace) for the module, the statement is
a) sets = sets.AbstractEnumerableSet.extend(); b) sets.SingletonSet = sets.AbstractEnumerableSet.extend(...); c) sets.SingletonSet = sets.extend(...); d) sets = sets.extend(...);
Answer
Answer: b [Reason:] The sets object is the namespace for the module, and we define each of the set classes as a property of this object.
Synopsis and Project Report
You can buy synopsis and project from distpub.com. Just visit https://distpub.com/product-category/projects/ and buy your university/institute project from distpub.com