0% found this document useful (0 votes)
5 views6 pages

Final Answers

Uploaded by

g.farhanmohd2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Final Answers

Uploaded by

g.farhanmohd2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Here are the answers in the format you prefer:

1. Which of the following data structures uses LIFO (Last In First Out) principle?
Answer: B) Stack

2. Which of the following sorting algorithms has the best average-case time complexity?
Answer: C) Quick Sort

3. Which of the following data structures can be used to implement a queue?


Answer: D) Both B and C

4. What is the main principle of a queue data structure?


Answer: A) First In, First Out (FIFO)

5. Which of the following data structures is used in the implementation of recursion?


Answer: C) Stack

6. Which data structure is used to perform breadth-first search (BFS) in a graph?


Answer: B) Queue

7. What is the time complexity of accessing an element in an array by index?


Answer: A) O(1)

8. What is the main advantage of using a linked list over an array?


Answer: C) Dynamic size and ease of insertion/deletion

CoreJava:
Here are the answers:

1. What is garbage collection in the context of Java?


Answer: Memory used by the object with no reference is automatically reclaimed.

2. What are the values of x and z? x = 5; z = x++;


Answer: x = 6; z = 5
3. What are the values of x and y? x = 5; y = ++x;
Answer: x = 6; y = 6

4. What is the extension of compiled Java classes?


Answer: B) .class

5. Which package is automatically imported into every Java program?


Answer: C) java.lang

6. Java language was initially called as ________


Answer: C) Oak

Java 8 Features:

Here are the answers:

1. Which class provides a resizable array, which can grow as needed?


Answer: A) ArrayList

2. What is the primary purpose of the Optional class introduced in Java 8?


Answer: A) To represent a potentially absent value and avoid null pointer exceptions

3. Which method is used to remove all elements from a collection?


Answer: B) clear()

4. Which of the following is a root interface of the Java collection framework?


Answer: C) Collection

5. Which of the following methods can be added to a generic class?


Answer: D) All of the above

6. What is the primary purpose of generics in Java?


Answer: B) To allow type-safe collections

7. Which method is used to return the number of elements in a collection?


Answer: C) size()

8. Which of the following classes guarantees that the elements are ordered according to their
natural ordering or by a specified comparator?
Answer: C) TreeSet

Spring:

Here are the answers:

1. What stands true for Spring framework?


Answer: a. Spring framework is a light weight framework.

2. What is singleton scope?


Answer: This scopes the bean definition to a single instance per Spring IoC container.

3. Which of the following is not a core interface of Hibernate?


Answer: c) SessionManagement

4. DAO methods require access to the session factory, which can be injected
Answer: d) all of the mentioned

5. For building a RESTful Web Services, we need to add


Answer: a. spring-boot-starter-web

HTML and CSS:

Here are the answers:

1. Which of the following property is used to indicate whether the backside of an element is
visible if the element is rotated to display the back?
Answer: b) backface-visibility

2. Which of the following is the attribute that is used to set a global identifier for a microdata
item?
Answer: d) itemid

Javascript and Typescript:

Here are the answers:

1. Predict the output of the following JavaScript code.


Answer: C) n

2. Which of the following keywords is used to define a variable in JavaScript?


Answer: c) Both A and B

3. Choose the correct JavaScript syntax to change the content of the following HTML code.
Answer: B) document.getElementById(“c2tc”).innerHTML=”TNS India Foundation C2TC”;

4. What is the HTML tag under which one can write the JavaScript code?
Answer: C) <script>

Aptidute:

Here are the answers:

1. Which of the following shows the relation that S is the father of Q?


Answer: S @ P $ Q

2. Who is sitting right to Prakash?


Answer: Deepa

3. In this series, look at both the letter pattern and the number pattern. Fill the blank.
Answer: UAV
4. In this series, look for the degree and direction of change between the numbers. What
number should come next in the series: 14, 28, 20, 40, 32, 64, ...?
Answer: 52

Quantitative reasoning:

Here are the answers:

1. Abhay's speed is:


Answer: 6 kmph

2. The value of x is:


Answer: 16

3. The area of a parallelogram with base 24 cm and height 16 cm is:


Answer: 384 cm²

4. The weight of B is:


Answer: 26 kg

Verbal Reasoning:

Here are the answers:

1. The river overflowed its ...... and flooded the area.


Answer: banks

2. The central idea of this passage could be best expressed by the following:
Answer: The employee must change their outlook towards work

3. According to the writer, the administration in India:


Answer: is more or less ineffective

You might also like