0% found this document useful (0 votes)
33 views

Collection Exit Model Exam File Final

This document appears to be an exit exam for a computer science department course covering topics in data structures and algorithms, computer organization and architecture, and operating systems. It consists of 31 multiple choice questions testing knowledge of these subject areas. Specifically, questions assess knowledge of data structures like arrays, stacks, queues and trees. Algorithm topics include sorting and tree traversal. Computer architecture topics include CPU operation, memory, and I/O devices. Operating systems topics include processes, process scheduling, and memory management.

Uploaded by

dilame bereket
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Collection Exit Model Exam File Final

This document appears to be an exit exam for a computer science department course covering topics in data structures and algorithms, computer organization and architecture, and operating systems. It consists of 31 multiple choice questions testing knowledge of these subject areas. Specifically, questions assess knowledge of data structures like arrays, stacks, queues and trees. Algorithm topics include sorting and tree traversal. Computer architecture topics include CPU operation, memory, and I/O devices. Operating systems topics include processes, process scheduling, and memory management.

Uploaded by

dilame bereket
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Woldia University

Institute of Technology School of Computing


Department of Computer Science
Exit Model Exam Time Allotted: 3:20 Hrs.
Name__________________________________ ID_______________________

Choose the best answer for the following questions from the given alternatives and write the
answer on the space provided. (1 pt. each)
Part One: Data Structure and Algorithm
1. Which of the following is a linear data structure?
A. Array B. AVL Tree C. Binary Tree D. Graph
2. How the 2nd element in an array accessed is based on pointer notation?
A. *a + 2 B. *(a + 2) C. *(*a + 2) D. &(a + 2
3. Which one of the following is not the type of Queue?
A. Priority queue C. Circular queue
B. Single-ended queue D. Ordinary queue
4. What is the disadvantage of array data structure?
A. The amount of memory to be allocated should be known beforehand
B. Elements of an array can be accessed in constant time
C. Elements are stored in contiguous memory block
D. Multiple other data structure can be implemented using array

5. What is the output of the following code snippet?


void solve() {
stack<int> s;
s.push(1);
s.push(2);
s.push(3);
for(int i = 1; i <= 3; i++) {
cout << s.top() << “ “;
s.pop();
}
}
A. 3 2 1 B. 1 2 3 C. 3 D. 1

1|Page
6. What function is used to append a character at the back of a string in c++?
A. Push back B. Append C. Push D. Insert()
7. When a pop() operation is called in an empty queue, what is the condition called?
A. Overflow B. Underflow C. Syntax Error D. Garbage Value
8. What is the time complexity of the following code snippet in c++?
void solve() {
string s = "scaler";
int n = s.size();
for(int i = 0; i < n; i++) {
s = s + s[i];
}
cout << s << endl;
}
A. O(n) B. O(n^2) C. O(1) D. O(log n)

9. Which of the following data structure can be used to implement queues?


A. Stack B. Arrays C. Linked List D. All of the above
10. Which of the following data structures allow insertion and deletion from both ends?
A. Stack B. Deque C. Queue D. String
11. What is the maximum number of swaps that can be performed in the Selection Sort algorithm?
A. n – 1 B. n C. 1 D. n – 2
12. Which of the following is a divide and Conquer algorithm?
A. Bubble Sort B. Selection Sort C. Heap Sort D. Merge Sort
13. Which of the following represents the Postorder Traversal of a Binary Tree?
A. Left -> Right -> Root C. Right -> Left -> Root
B. Left -> Root -> Right D. Right -> Root -> Left
14. In a graph of n nodes and n edges, how many cycles will be present?
A. Exactly 1 C. At most 2
B. At most 1 D. Depends on the graph
15. Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary
search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order
traversal sequence of the resultant tree?
A. 7 5 1 0 3 2 4 6 8 9 C. 0 1 2 3 4 5 6 7 8 9
B. 0 2 4 3 1 6 5 9 8 7 D. 9 8 6 4 2 3 0 1 5 7

2|Page
Part Two: Computer Organization and Architecture
16. The time required for the fetching and execution of one simple machine instruction is______
A. Delay time C. Real time
B. CPU cycle D. Seek time
17. Which one of the following access method is used for obtaining a record from a cassette tape?
A. Direct C. Random
B. Sequential D. All of the above
18. Where have the program and data to be located before the ALU and control unit of a computer can
operate on it?
A. Internal memory C. Microprocessor
B. Secondary memory D. Magnetic tapes

19. The unit of a computer system that executes program, communicates with and often controls the
operation of other subsystems of the computer is known as
A. CPU C. I/O unit
B. Control Unit D. Peripheral unit
20. Which one of the following is true about process of entering data into a storage location
A. adds to the contents of the location C. is known as a readout operation
B. cause variation in its address number D. is destructive of previous contents
21. A hashing scheme is used in which one of the following file organization.
A. Sequential file organization C. Indexed sequential file organization
B. Direct file organization D. Partitioned file organization
22. Primary storage is _____as compared to secondary storage.
A. Slow and inexpensive C. Fast and expensive
B. Fast and inexpensive D. Slow and expensive
23. When we used with I/O devices, the term intelligent implies
A. A color output capability C. High speed printing capability
B. Speech processing capability D. Feature to support offline and online tasks
24. Which one of the following statements is wrong statement?
A. Information stored in RAM can be changed by over writing it
B. Information stored in ROM cannot be changed by overwriting
C. Information can be stored in any location of RAM
D. Computer main memory can be accessed only sequentially
25. Everything computer does is controlled by its
A. RAM B. ROM C. CPU D. Storage devices

3|Page
26. Which one of the following cannot be a factor when categorizing a computer?
A. Speed of the output device C. Capacity of the hard disk
B. Amount of main memory the CPU can use D. Where it was purchased
27. In which area of the primary storage section are the intermediate processing results held temporarily?
A. Input storage area C. Output storage area
B. Program storage area D. Working storage space
28. Which of the following are the three basic sections of a microprocessor unit?
A. Operand, register, and arithmetic/logic unit (ALU)
B. Control and timing, register, and arithmetic/logic unit (ALU)
C. Control and timing, register, and memory
D. Arithmetic/logic unit (ALU), memory, and input/output
29. Which parts of the computer is used for calculating and comparing?
A. Disk unit B. Control unit C. ALU D. Mod
30. A computer system consisting of its processor, memory and I/O devices accepts data, processes it and
produces the output results. In which component is the raw data fed?
A. Mass Memory B. Main memory C. Logic unit D. Arithmetic unit
31. A memory bus is mainly used for communication between
A. Processor and memory C. I/O devices and memory
B. Processor and I/O devices D. Input device and output device
32. Which of the following registers is used to keep track of address of the memory location where the
next instruction is located?
A. Memory Address Register C. Instruction Register
B. Memory Data Register D. Program Counter
Part Three: Operating System
33. A Process Control Block (PCB) does not contain which of the following?
A. Code B. Stack C. Bootstrap program D. Data
34. The number of processes completed per unit time is known as __________
A. Output B. Throughput C. Efficiency D. Capacity
35. The state of a process is defined by __________
A. the final activity of the process C. the activity to next be executed by the process
B. the activity just executed by the process D. the current activity of the process
36. Part of the operating system will loaded in ___ part of memory.
A. Upper B. Lower C. Both D. None of these
37. What will happen when a process terminates?

4|Page
A. It is removed from all queues C. Its process control block is de-allocated
B. It is removed from all, but the job queue D. Its process control block is never de-allocated
38. What is a long-term scheduler?
A. It selects processes which have to be brought into the ready queue
B. It selects processes which have to be executed next and allocates CPU
C. It selects processes which heave to remove from memory by swapping
D. None of the mentioned
39. In a multiprogramming environment __________
A. the processor executes more than one process at a time
B. the programs are developed by more than one person
C. more than one process resides in the memory
D. a single user can execute many programs at the same time
40. What is Inter process communication
A. allows processes to communicate and synchronize their actions when using the same address space
B. allows processes to communicate and synchronize their actions
C. allows the processes to only synchronize their actions without communication
D. none of the mentioned
41. Which of the following two operations are provided by the IPC facility?
A. write & delete message C. send & delete message
B. delete & receive message D. receive & send message
42. What is a semaphore?
A. is a binary mutex C. can be accessed from multiple processes
B. must be accessed from only one process D. none of the mentioned
43. CPU fetches the instruction from memory according to the value of ____________
A. program counter C. instruction register
B. status register D. program status word
44. Which one of the following is the address generated by CPU?
A. physical address C. logical address
B. absolute address D. none of the mentioned
45. Memory management technique in which system stores and retrieves data from secondary storage for
use in main memory is called?
A. Fragmentation C. Mapping
B. Paging D. none of the mentioned
46. Program always deals with ____________

5|Page
A. logical address B. absolute address C. physical address D. relative address
47. What is compaction?
A. a technique for overcoming internal fragmentation
B. a paging technique
C. a technique for overcoming external fragmentation
D. a technique for overcoming fatal error
Part Four: Formal Language and Complexity Theory
48. Which one of an algorithm is usually used when describing the number of steps it needs to take to
solve a problem, but it can also be used to describe how long it takes verify an answer?
A. Space complexity C. Solving time
B. Time complexity D. Solving space
49. Which one is not correct related to the word of ababacbca
A. Suffix = cbca C. Mirror image= acbcababa E. |ɛ|=1
B. Prefix = ɛ D. Sub-word= bcaba F. None
50. Which class is not solved by turing machine deterministic polynomial time but solvable by a Turing
machine in nondeterministic polynomial time?
A. P class C. NP class
B. NP complete class D. None
51. From the given sentences which one is incorrect sentence
A. A formal language is an abstraction of the general characteristics of programming languages.
B. A formal language is the set of all strings permitted by rules of formation
C. A formal language is a set of words over an infinite alphabet.
D. The language is finite if it contains only a finite number of words.
E. All abstract machines manipulate languages of words.
F. All
G. None
52. Which one is the correct answer from the given alternatives
A. aa . bab = babaa C. a(a)*(ba)*=aaabababaa
B. a(a,b)*ab=abbbaaabab D. ab(ab)*=ababa
53. “Which one is best possible programming language to learn?” is an example of
A. Decision problem C. Optimization problem
B. Search problem D. Counting problem
54. Using the given transition diagram which one is not accepted by the finite automata

6|Page
A. 0*001100110 E. 000*10*1
B. 100*1 F. A and C
C. 01100100*0100*110*1 G. A and D
D. 0101011 H. None
55. Which pair from the following is not an example of NP class
A. Chess, Sudoko n*n
B. Sudoko n*n, halting problem
C. Tetris, Shortest paths, decision subset sum problem
D. All
E. None
56. Which one from the following notation is best case asymptotic
A. Ω B. Θ C. Big-O D. None
57. Which notation describes an algorithm whose performance is directly proportional to the square of
the size of the input data set?
A. O(N) B. O(1) C. O(2N) D. None
58. Which one is incorrect sentence for the given alternatives
A. For all regular languages there is at least one finite automata
B. For all context free grammar there is at least one finite automata
C. For all regular grammar there is at least one regular expression
D. For all regular expression there is at least context free grammar
E. All
F. None
59. Which automaton is with temporary storage?
A. Finite Automata C. Pushdown automata
B. Turing Machine D. Nondeterministic finite automaton
60. Which one is correct sentence about grammar
A. A  abaaA is right-linear C. A  bB is right-linear E. B and C
B. A  a is right-linear D. A and B F. All

61. Which argument is not influenced to the push down automata?


A. The current state of the control unit C. The current input symbol
B. The current output symbol D. The current symbol on top of the stack

7|Page
62. Which complexity class is on the right pair with its example?

A. Class P= Linear programming D. Class NP = the halting problem


B. Class NP= Graph coloring E. All
C. Class P = Maximum matching F. None
Part Five: Compiler Design
63. When the parser starts constructing the parse tree from the start symbol and then tries to transform the
start symbol to the input, it is called?
A. Recursive descent parsing C. Top-down Parsing
B. Backtracking D. Bottom-up Parsing
64. Eliminate left recursion from the following grammar. S→ Sa |b which of the following is correct
grammar.
A. S→bS' C. S→S'b
S'→ aS' S'→ S'a|∈
B. S→bS' D. S→SS'b
S'→ aS'|∈ S'→ SS'a|∈
65. Which of the following statements is false?
A. An LL(1) parser is a top-down parser
B. LALR is more powerful than SLR
C. An ambiguous grammar can never be LR(k) for any k
D. An ambiguous grammar has same leftmost and rightmost derivation
66. The grammar A→AA|(A)|ε: is not suitable for predictive-parsing because the grammar is
A. left-recursive C. right-recursive
B. ambiguous D. operator-grammar
67. Left factoring guarantees
A. not occurring of backtracking C. error free target code
B. free parse tree D. correct LL(1) parsing table
68. Which of the following statement is false?
A. Top-down parser uses derivation whereas Bottom-up uses reduction.
B. Top-down parsing uses LL(1) grammar whereas Bottom-up uses LR grammar.
C. Ambiguous grammar are not suitable for top-down parsing whereas ambiguous grammar is
accepted by bottom-up parsing
D. None of the Above.
69. We can get an LL(1) grammar by ______________
A. Removing left recurrence B. Applying left factoring

8|Page
C. remove left recurrence and Apply left factoring D. None of the above.
70. In a bottom-up evaluation of a syntax directed definition, inherited attributes can
A. always be evaluated
B. be evaluated only if the definition is L-attributed
C. be evaluated only if the definition has synthesized attributes
D. never be evaluated
71. Inherited attribute can easily be simulated by an _______________
A. LL grammar B. Ambiguous C. LR grammar D. None of the above

72. The compilation process is partitioned into a series of sub processes called _________
A. Phases B. sub program C. module D. subsets
73. ____________is used for translators that take programs in one high-level language into equivalent
programs in another high-level language.
A. Preprocessor B. Compiler C. Assembler D. Translator
74. If the lexical analyzer finds a token invalid then?
A. it generates an exception C. it generates an error
B. it generates a warning D. reads the whole program
75. If an error occurs, what interpreter does?
A. terminate program C. reads the whole program even if errors
B. stops execution D. give warning
76. If an error occurs, what compiler does?
A. terminate program D. reads the whole program even if it
B. stops execution encounters errors
C. give warning
77. A compiler that runs on platform (A) and is capable of generating executable code for platform (B) is
called?
A. cross-compiler C. object-compiler
B. complex-compiler D. post-compiler
78. A compiler phase that designed to improve the intermediate code.
A. Code Generation C. Code optimization
B. Syntax Analyzer D. Intermediate code generator

79. Syntactic structure can be regarded as a tree whose leaves are the ______________.
A. tokens B. macro C. scanner D. parser
80. Why compiler needs to execute semantic rules?

9|Page
A. To assign attribute values C. to provide grammar production

B. To identify terminals in grammar D. None

81. When the lexical analyzer read the source-code, it scans the code?
A. line by line C. letter by letter
B. word by word D. reads the whole program
82. Which of the following is the task of lexical analysis?
A. To initialize the variables
B. To build the uniform symbol table
C. To organize the variables in a lexical order language
D. None of the above.
Part Six: Network and System Administration
83. Which one of the following is not the main task associated with network administration?
A. Design, installation and evaluation of the network
B. Execution and administration of regular backups
C. Installing and configuring new hardware and software.
D. Administration of network security, including intrusion detection
84. Which one of the following is not the duties/responsibility of System administrator?
A. User administration C. Access control
B. Monitor network communication D. Intrusion detection systems
85. Which is the roles of a network administrator?
A. Installing networking systems C. Identifying problems
B. Configuring computer networks D. All
86. What is so special about the system administrator account?
A. Unrestricted access C. do anything with system
B. Full access D. all
87. Which one of the following is not the challenges of system administration?
A. Time is not on their side
B. It’s hard to work around the users
C. Users are unpredictable
D. Reinforcing security and reliability of dynamic networks.

88. Which of the following is not the objectives of network and System administration?
A. Analyzing network issues C. Modifying systems
B. Designing networks D. None

10 | P a g e
89. You work as a Network Administrator for Woldia University. The institution has a Linux-based
network. The permissions on a file named Report are shown below: rwxr- -r you want to add a sticky
bit to the file. Which of the following commands will you use?
A. chmod 1744 report C. chmod 4744 report
B. chmod 7744 report D. chmod 2744 repor
90. Which of the following files contains the names and locations of system log files?
A. /etc/lilo.conf C. /usr/lilo.conf
B. /usr/syslog.conf D. /etc/syslog.conf

91. Which of the following commands helps an administrator to switch a Linux server to different run
levels without rebooting the server?
A. Su B. Mount C. Cngrl D. init
92. Which of the following utilities is used to set ACL for files and directories?
A. Setfacl B. Setacl C. Getfacl D. enable acl
93. After enabling shadowed passwords in a Linux server, where does Linux keep the password?
A. /usr/shadow C. /usr/passwd
B. /etc/passwd D. /etc/shadow

94. You are able to telnet to a port even when the HTTP monitor says it is down. In what way do you fix
the problem?
A. Creative ways to solve difficulties
B. Ability to communicate and find the issue
C. Desire to discover the reason behind problems
D. All

95. Which is the correct command syntax to rename a file "abc.txt" to "pqr.txt"?
A. mv abc.txt pqr.txt C. mv -a pqr.txt abc.txt
B. mv pqr.txt abc.txt D. mv -all pqr.txt abc.txt

96. If you want to create a new directory named XYZ, which command will be used for this purpose?

A. cd XYZ B. chdir XYZ C. mkdir XYZ D. md XYZ

97. Which one of the following system can’t implement ACL’s?


A. File system C. Firewall system
B. Networking system D. SQL implementation system

11 | P a g e

You might also like