Computer Science
Computer Science
Total 100%
Computer Science (Detailed)
PROGRAMMING FUNDAMENTALS:
DISCRETE STRUCTURES:
OPERATING SYSTEMS:
ANALYSIS OF ALGORITHMS:
7%
ARTIFICIAL INTELLIGENCE:
14. 5%
SYSTEM PROGRAMMING:
Answers:
1. b) To enhance code readability and maintainability
2. b) C
3. c) Code reusability and maintainability
4. a) Analysis
5. b) Identifies errors and defects in the program
6. c) Loop
7. b) Store data in a structured format
8. c) To perform a specific task and return a result
9. b) Record
10. c) They store data persistently on a storage device
You
GAT subject test conducted by NTS
ChatGPT
ChatGPT
For the GAT Subject Test conducted by the National Testing Service (NTS), you might encounter
questions that cover a wide range of topics related to the subject you're being tested on. Here are
ten multiple-choice questions (MCQs) that could be relevant to a GAT Subject Test:
Answers:
1. d) all of the above
2. c) Quick Sort
3. a) Binding data and functions into a single unit
4. c) Hash Table
5. b) O(log n)
6. a) To uniquely identify each row in the table
7. b) Guaranteed delivery of packets
8. c) Quick Sort
9. b) A key that establishes relationships between tables
10. b) MODIFY
Certainly! Here are 70 multiple-choice questions (MCQs) distributed across various
categories relevant to the GAT Subject Test in Computer Science conducted by NTS:
1. Which of the following is not a valid data type in C programming language? a) int
b) float c) char d) string
2. What is the output of the following C code?
cCopy code
int x = 5; printf("%d", x++);
a) 5 b) 6 c) 4 d) 7
3. Which control structure is used to execute a block of code repeatedly in C? a) if-
else b) switch c) for d) break
4. In C programming, what does the "void" keyword indicate in a function
declaration? a) It returns an integer value b) It returns nothing c) It indicates an error d)
It is used for memory allocation
5. Which operator is used to access the value stored in a variable's memory address
in C? a) * b) & c) -> d) .
11. Which of the following is not a valid logical connective? a) AND b) OR c) XOR d)
ADD
12. What is the negation of the statement "All humans are mortal"? a) All humans are
immortal b) No humans are mortal c) Some humans are mortal d) Some humans are
immortal
13. In set theory, the intersection of two sets A and B contains: a) All elements that
are in A or B b) All elements that are in both A and B c) All elements that are only in A,
not in B d) All elements that are only in B, not in A
14. What is the cardinality of an empty set? a) 0 b) 1 c) Undefined d) Infinite
15. Which of the following is not a valid quantifier in predicate logic? a) There exists
(∃) b) For all (∀) c) At least one (∃1) d) None of the above
21. Which logic gate produces a high output only when all inputs are high? a) AND
gate b) OR gate c) NAND gate d) XOR gate
22. What is the binary representation of the decimal number 10? a) 1010 b) 1001 c)
1111 d) 1100
23. Which of the following is a volatile memory type? a) ROM b) EEPROM c) RAM d)
Flash memory
24. What is the purpose of the CPU in a computer system? a) To store data
permanently b) To execute instructions c) To provide input/output capabilities d) To
display graphical content
25. Which component is responsible for storing program instructions and data
temporarily in a computer system? a) ALU b) Cache memory c) Hard disk d) Optical drive
31. Which type of database model organizes data into tables with rows and columns?
a) Hierarchical b) Network c) Relational d) Object-Oriented
32. What is the purpose of a primary key in a database table? a) To uniquely identify
each row in the table b) To define constraints on the data types allowed in the table c)
To establish relationships with other tables d) To sort the rows in ascending order
33. Which database operation is used to retrieve specific data from a table based on
a given condition? a) INSERT b) UPDATE c) DELETE d) SELECT
34. What is the purpose of normalization in database design? a) To increase
redundancy b) To reduce data integrity c) To eliminate duplicate data d) To simplify
queries
35. Which type of join returns only the rows that have matching values in both tables
being joined? a) Inner join b) Outer join c) Left join d) Right join
41. Which layer of the OSI model is responsible for logical addressing and routing? a)
Physical layer b) Data link layer c) Network layer d) Transport layer
42. What is the purpose of the TCP protocol in computer networks? a) To establish a
connection between devices b) To guarantee the delivery of packets c) To resolve
domain names to IP addresses d) To transmit data over the network
43. Which network topology connects all devices in a linear sequence? a) Bus b) Ring
c) Star d) Mesh
44. What is the purpose of DNS in computer networks? a) To translate domain names
to IP addresses b) To secure data transmission c) To establish a direct connection
between devices d) To filter network traffic
45. Which protocol is used to send email messages over the internet? a) HTTP b) FTP
c) SMTP d) TCP
46. What is the purpose of the program counter (PC) in a CPU? a) To store
intermediate results b) To fetch the next instruction to be executed c) To perform
arithmetic operations d) To store data temporarily
47. Which instruction moves data from memory to a register in assembly language?
a) MOV b) ADD c) JMP d) CALL
48. What is the purpose of the ALU in a CPU? a) To store data temporarily b) To
perform arithmetic and logic operations c) To manage input/output devices d) To
execute program instructions
49. Which addressing mode is used to access memory locations directly using a fixed
address? a) Immediate b) Direct c) Indirect d) Indexed
50. What is the purpose of the stack pointer (SP) register in a CPU? a) To store the
address of the next instruction to be executed b) To store the address of the top of the
stack c) To store intermediate results during arithmetic operations d) To store data
temporarily
56. What is the time complexity of linear search in an unsorted array? a) O(1) b)
O(log n) c) O(n) d) O(n^2)
57. Which of the following is not a valid complexity class? a) P b) NP c) NP-hard d)
PSPACE
58. What is the time complexity of the bubble sort algorithm in the worst-case
scenario? a) O(1) b) O(log n) c) O(n) d) O(n^2)
59. Which algorithm is used to find the shortest path in an unweighted graph? a)
Dijkstra's algorithm b) Bellman-Ford algorithm c) Floyd-Warshall algorithm d) Breadth-
First Search (BFS)
60. What is the purpose of big O notation in the analysis of algorithms? a) To
represent the best-case time complexity of an algorithm b) To represent the average-
case time complexity of an algorithm c) To represent the worst-case time complexity of
an algorithm d) To represent the space complexity of an algorithm
71. Which of the following is not a valid numerical computing library in Python? a)
NumPy b) SciPy c) Pandas d) Matplotlib
72. What is the purpose of linear interpolation in numerical computing? a) To
approximate values between known data points b) To solve systems of linear equations
c) To calculate the derivative of a function d) To perform matrix multiplication
73. Which numerical method is used to find the roots of a nonlinear equation? a)
Newton-Raphson method b) Euler's method c) Gaussian elimination d) Simpson's rule
74. What is the purpose of numerical integration in numerical computing? a) To
approximate the area under a curve b) To solve differential equations c) To optimize
functions d) To interpolate data points
75. Which numerical technique is used to approximate the solution to a differential
equation? a) Finite difference method b) Gradient descent c) Singular value
decomposition d) LU decomposition
Answers:
1. d) string
2. a) 5
3. c) for
4. b) It returns nothing
5. b) &
6. b) Ability to define a new class from an existing class
7. b) Polymorphism
8. a) It refers to the current class object
9. b) A method used to initialize objects
10. b) final
11. d) ADD
12. a) All humans are immortal
13. b) All elements that are in both A and B
14. a) 0
15. c) At least one (∃1)
16. c) Tree
17. a) O(1)
18. c) Merge Sort
19. b) To solve problems by breaking them down into smaller subproblems
20. c) Dijkstra's Algorithm
21. a) AND gate
22. a) 1010
23. c) RAM
24. b) To execute instructions
25. b) Cache memory
26. a) To manage hardware resources
27. b) Shortest Job Next (SJN)
28. c) To extend the available RAM
29. a) Mutual exclusion
30. b) A program that controls hardware devices
31. c) Relational
32. a) To uniquely identify each row in the table
33. d) SELECT
34. c) To eliminate duplicate data
35. a) Inner join
36. b) To track and manage changes to source code
37. c) Agile model
38. b) To test individual components or units of code
39. d) Task decomposition
40. b) To define the functional and non-functional requirements of the software
41. c) Network layer
42. b) To guarantee the delivery of packets
43. a) Bus
44. a) To translate domain names to IP addresses
45. c) SMTP
46. b) To fetch the next instruction to be executed
47. a) MOV
48. b) To perform arithmetic and logic operations
49. b) Direct
50. b) To store the address of the top of the stack
51. d) Variables
52. b) To describe patterns of strings
53. b) Pushdown automaton
54. c) DFA has deterministic transitions, while NFA has nondeterministic transitions
55. c) Concatenation
56. c) O(n)
57. d) PSPACE
58. d) O(n^2)
59. d) Breadth-First Search (BFS)
60. c) To represent the worst-case time complexity of an algorithm
61. c) Cryptography
62. b) To process and analyze large datasets
63. b) Reinforcement learning
64. c) A test to determine if a computer can exhibit human-like intelligence
65. c) Support vector machine
66. a) To translate assembly language code into machine code
67. d) print()
68. b) To combine object files into a single executable file
69. c) C
70. a) To provide reusable code modules
71. c) Pandas
72. a) To approximate values between known data points
73. a) Newton-Raphson method
74. a) To approximate the area under a curve
75. a) Finite difference method