0% found this document useful (0 votes)
103 views14 pages

PRN Test 3

This document contains 50 multiple choice questions related to computer science topics like data structures, algorithms, programming concepts and Unity game development. The questions cover concepts like linked lists, graphs, arrays, sorting algorithms, input handling in Unity and physics in games. Key topics assessed include time complexity of linked list operations, graph representations, properties of different data structures and their applications.

Uploaded by

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

PRN Test 3

This document contains 50 multiple choice questions related to computer science topics like data structures, algorithms, programming concepts and Unity game development. The questions cover concepts like linked lists, graphs, arrays, sorting algorithms, input handling in Unity and physics in games. Key topics assessed include time complexity of linked list operations, graph representations, properties of different data structures and their applications.

Uploaded by

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

1. Speed in units per second that the axis will move toward the target value .

This is for digital devices


only . What the property is it ?
a.None
b.Dead
c.Sensitivity
d.Snap
e.Gravity

2. A connected planar graph having 6 vertices , 7 edges contains _____ regions


a.1
b.3
c.15
d.11

3.In List class , to removes all the elements from the list , we can use …
a.Clear method
b.Remove method
c.Clear property
d.Remove class

4.Which of the following ways can be used to represent a graph


a.Adjacencyt List and Adjacencyt Matrix
b.No way to represent
c. Adjacencyt List , Adjacencyt Matrix well as Incidence Matrix
d. Incidence Matrix

5.Which of the following statements for a simple graph is correct


a.Path amd trail have no relation
b.Every path is a trail
c.Every trail is a path well as every path is a trail
d.Every trail is a path

6.Which of the following properties does a simple graph not hold


a.Must have no loops or multiple edges
b.Must have no multiple edges
c.Must be connected
d.Must be unweighted

7.What is the time complexity of inserting at the end in dynamic arrays


a.O(n)
b.O(1)
C.O(logn)
d.Either O(1) or O

8. In linked list each node contains a minimum of two fields . One fields is data field to store the data
second field is
a.Pointer to Integer
b.Node
c.Pointer to node
d.Pointer to character

9.What would be the asymptotic time complexity to find an element in the linked list
a.O(1)
b.O(n)
c.O(n2)
d.O(n4)

10.Linked list are not suitable for the implementation of ________


a.Binary search
b.Radix sort
c.Insertion sortt
d.Polynimial manipulation

11. With property Name of input axis, you use this to access the axis ________
Select one:
a. from scripts.
b. from Main camera
c. All of the above
d. from physic material
e. from game object

12.The Input Manager window allows you to define _____ and their associated actions for your
Project
a.Input axes
b.Input method
c.Input data
d.None of the above

13.To get the velocity of the rigidbody at the point worldPoint in global space
a. None of the above
b.GetVelocity method
c.GetPointVelocity method
d.GetRelativeVelocity method

14.SYNTAX : While loop


a. do {
loop body
} while (Boolean expression)

b. while (Boolean expression){


loop body
}
c.None of above
d.All of above

15.The Physics keys option allows you to map key codes to the ______
a.physical keyboard devices
b. physical keyboard layout
c. physical keyboard value
d.None of the above

16.Adding a Rigidbody component to an object will ___


a. Rigidbody object will be pulled downward by gravity without adding any code
b.put its motion under the control of Unity’s physics engine
c.react to collisions with incoming objects if the right Collider component is also present
d.All of the above

17.With Descriptive Name , Descriptive Negative Name properties of input axis , These values are
deprecated and ____
a.None of the above
b.All of the above
c.show on the screen
d.do not work

18.For which of the following combinations of the degrees of vertices would graph be eulerian
a.1,2,3
b.2,3,4
c.1,3,5
d.2,4,5

19.To input data for an element (example for an array of float elements , using ) _____
a.All of the above
b.Console.WriteLine(variableName[index])
c.None of the above
d.variableName[index] = float.Parse(Console.Readline());

20.How many separate systems which Unity supports input through


a.Two
b.One
c.None of the above
d.Three
e.Four
21.What would be the asymptotic time complexity to add a node at the end of singly linked list , if
the pointer is initially pointing to the head of the list
a.O(1)
b.O(n)

c.θ(1)

d. θ(n)

22. How far the user needs to move an analog stick before your application registers the movement.
At runtime, input from all analog devices that falls within this range will be considered null.
it is ............property of input axis
a. Gravity
b. Snap
c. Dead
d. None of the above

23.What is the memory efficiency double linked list


a) Each node has only one pointer to traverse the list back and forth
b) The list has breakpoints for faster traversal
c) An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list
d) A doubly linked list that uses bitwise AND operator for storing addresses

24.The ____ property of input axis can be used to display speed in units per second that the axis falls
toward neutral when no input is present
a.Snap
b.Gravity
c.Type
d.Sensitivity

25.The concatenation of two lists can be performed in O(1) time . Which of the following variation of
the linked list can be used
a) Singly linked list
b) Doubly linked list
c) Circular doubly linked list
d) Array implementation of list
26.A graph with all vertices having equal degree is known as a _________
a.Complete Graph
b.Simple Graph
c.Regular Graph
d.Multi Graph

27.Which of the following points is/are not true about Lonked List data structure when it is compared
with an array
a) Arrays have better cache locality that can make them better in terms of performance
b) It is easy to insert and delete elements in Linked List
c) Random access is not allowed in a typical implementation of Linked Lists
d) Access of elements in linked list takes less time than compared to arrays

28.Linked list is considered as an example of _______ type of memory allocation


a.heap
b.Compile Time
c.Static
d.Dynamic

29.Which of the following is false about a doubly linked list


a) We can navigate in both the directions
b) It requires more space than a singly linked list
c) The insertion and deletion of a node take a bit longer
d) Implementing a doubly linked list is easier than singly linked list

30.What is the number of edges present in a complete graph having n vertices


a.(n*(n-1))/2
b.None of the aboves
c.n
d.(n*(n+1))/2

31.There is a common problem when starting out with Rigidbodies .What is this
b.the game physics appears to run in “quickly”
c. the game physics appears to run in “repeat”
d. the game physics appears to run in “slow motion”
32.Which of the following sorting algorithms can be used to sort a random linked list with minimum
time complexity
a.Quick Sort
b.Merge Sort
c.Insertion Sort
d.Heap Sort

33.You are given pointers to first and last nodes of a singly linked list , which of the following
operations are dependent on the length of the linked list
a) Delete the first element
b) Insert a new element as a first element
c) Delete the last element of the list
d) Add a new element at the end of the list

34.How do you calculate the pointer difference in a memory efficient double linked list
a) head xor tail
b) pointer to previous node xor pointer to next node
c) pointer to previous node – pointer to next node
d) pointer to next node – pointer to previous node

35.In a simple graph , the number of edges is equal to twice the sum of the degress of the vertices
a.false
b.true

36.Which of these is not an application of a linked list


a) To implement file systems
b) For separate chaining in hash-tables
c) To implement non-binary trees
d) Random Access of elements

37.Linked list data structure offers considerable saving in ______


a) Computational Time
b) Space Utilization
c) Space Utilization and Computational Time
d) Speed Utilization
38.to get a list of all Colliders that overlap all Colliders attached to this Rigidbody2D
a .OverlapCollider method
b. overlapCollider propert
c. overlapCollider method
d. OverlapCollider property

39.Using ____ to remove a GameObject , component or asset


a.Destroy method
b. destroy method
c.MoveGameObject method
d.moveGameObject property

40. Consider an implementation of unsorted singly linked list. Suppose it has its representation with
a head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i)Insertion at the front of the linked list
ii)Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv)Deletion of the last node of the linked list
a.I and II
b.I and III
c.I , II and III
d.I , II and IV

41.For a given graph G having v vertices and e edges wich is connected and has no cycles , which of
the following statements is true
a) v=e
b) v = e+1
c) v + 1 = e
d) v = e-1
42.With this property , it is the type of input that controls the axis . What are these value of Type
a.Key or Mouse button
b.All of the above
c.Joystick Axis
d.Mouse Movement

43.____ removes the first occurrence of a particular value from the list
a.Remove property
b.Remove method
c.Clear property
d.Clear method

44.What is the maximum number of edges in a bipartite graph having 10 vertices


a.21
b.24
c.25
d.16

45.In this given graph identify the cut vertices

a) B and E
b) C and D
c) A and E
d) C and B
46._______ returns the zero-based index of the first occurrence of a particular value
a. IndexOf property
b. None of the above
c. All of the above
d. IndexOf method

47. In Linked List implementation, a node carries information regarding ___________


a. Data and Link
b. Data
c. Node
d. Link

48. What kind of linked list is best to answer questions like “What is the item at position n?”
a. Singly linked list
b. Array implementation of linked list
c. Circular linked list
d. Doubly linked list

49. Linked lists are not suitable for the implementation of ___________
a. Polynomial manipulation
b. Radix sort
c. Binary search
d. Insertion sort

50. SYNTAX: Creating and Initializing an Array Variable is...


a. All of the above
b. elementType[] variableName = new elementType[arraySize];
c. None of the above
d. elementType[] variableName = { value0, value1, … };
51. Which of the following points is/are not true about Linked List data structure when it is compared
with an array?
a. Access of elements in linked list takes less time than compared to arrays
b. It is easy to insert and delete elements in Linked List
c. Arrays have better cache locality that can make them better in terms of performance
d. Random access is not allowed in a typical implementation of Linked Lists

52. With declaration


public void AddForce(Vector2 force, ForceMode2D mode = ForceMode2D.Force);
What are kind of Force that you can apply for ForceMode2D?
a. Acceleration
b. VelocityChange
c. Force
d. Impulse
e. All of the above

53. In general, C# programmers tend to use ................... whenever possible,though there isn't a set
C# standard to do so.
a. for loops
b. Nested loop
c. while loop
d. foreach loops

54. To access Input Manager, from Unity’s main menu, you can ........
a. go to Edit > Project Settings, then select Input System from the navigation on the right.
b. go to Edit > Project Settings, then select Input Manager from the navigation on the right.
c. None of the above
d. go to Edit > Project pane, then select Input Manager from the navigation on the right.
e. go to Edit > Project Settings, then select Input Data from the navigation on the right.

55. Which of the following is not a disadvantage to the usage of array?


a. Fixed size
b. Accessing elements at specified positions
c. Insertion based on position
d. There are chances of wastage of memory space if elements inserted in an array are lesser than the
allocated size

56. In Visual Studio, highlight or place the cursor over the Unity API you want to learn about, the
press....
a. Ctrl+Alt+K, Ctrl+M
b. Ctrl+Alt+M, Ctrl+K
c. Ctrl+Alt+M, Ctrl+H
d. Ctrl+Alt+H, Ctrl+M

57. In List class, .............method help adds an element to the end of the list.
a. push
b. Append
c. Adds
d. Add

58. What would be the asymptotic time complexity to insert an element at the second position in the
linked list?
a. O(n3)
b. O(1)
c. O(n2)
d. O(n)

59. What is output?


public void MoveRotation(Quaternion rot);
a. None of the above
b. The new rotation for the Rigidbody.
c. The new Quaternion for the Rigidbody.
d. The new rotation of Quanternion

60. In order to detect a collision between two objects, A and B, which of the following criteria need
to be satisfied?
a. A and B both have kinematic rigidbodies and colliders attached.
b. A and B both have non kinematic rigidbodies attached. Only A has a collider
c. A and B both have non kinematic rigidbodies and colliders attached to them
d. A and B both have colliders attached to them
e. A and B both colliders. Only A has a non kinematic rigidbody attached.

61. Unity supports input from many types of input devices, including:
Select one:
a.Keyboards and mice
b.Controllers
c.Movement-sensing capabilities of mobile devices, such as accelerometers or gyroscopes
d.VR and AR controllers
e. All of the above
f. None of the above
g.Touch screens
h.Joysticks

62. Colliders interact with each other differently depending on how their Rigidbody components are
configured. Following important configurations are?
a. The Kinematic Rigidbody Collider
b. All of the above
c. The Rigidbody Collider
d. The Static Collider

63.______ gets the number of elements contained in the list


a. Length property
b. Length method
c. Count property
d. Count method

64. What would be the asymptotic time complexity to insert an element at the front of the linked list
(head is known)?
a. O(n)
b. O(n3)
c. O(1)
d. O(n2)

65. Every Project you create has a number of input axes created ............
a. by user.
b. None of the above
c. by default.
d. by setting.

66. What is a memory efficient double linked list?


a. A doubly linked list that uses bitwise AND operator for storing addresses
b. The list has breakpoints for faster traversal
c. Each node has only one pointer to traverse the list back and forth
d. An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list

67. The Input Manager uses the following types of controls:


a. Button refers to any button on a physical controller (for example, gamepads), such as the X button
on a remote control.
b. All of the above
c. None of the above
d. A virtual axis (plural: axes) is mapped to a control, such as a button or a key. When the user
activates the control, the axis receives a value in the range of [–1..1]. You can use this value in your
scripts
e. Key refers to any key on a physical keyboard, such as W, Shift, or the space bar.

You might also like