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

HiLCoE School of Computer Science and Technology Model Exit Exam

The document contains 30 multiple choice questions related to fundamentals of programming, data structures and algorithms, object oriented programming in Java, database management systems, software engineering, and operating systems. The questions cover topics like arrays, loops, linked lists, classes, interfaces, database concepts like entity relationship diagrams and referential integrity, software development models, multithreading, and memory fragmentation.

Uploaded by

Mahlet Arega
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)
356 views14 pages

HiLCoE School of Computer Science and Technology Model Exit Exam

The document contains 30 multiple choice questions related to fundamentals of programming, data structures and algorithms, object oriented programming in Java, database management systems, software engineering, and operating systems. The questions cover topics like arrays, loops, linked lists, classes, interfaces, database concepts like entity relationship diagrams and referential integrity, software development models, multithreading, and memory fragmentation.

Uploaded by

Mahlet Arega
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/ 14

t.

me/dagmawi_abate
Fundamentals of Programming

1. Which of the following is false about arrays in C++?

A. An array is a collection of data elements where each element has the same data type.

B. The actual memory requirement of an array must be known before the compiler translates the
source code.

C. Array elements should be placed in contiguous memory locations.

D. A two-dimensional array of size N by M requires NxM bytes of memory space.

E. None of the above.

2. In a group of nested loops, which loop is executed the greatest number of times?

A. The outermost loop

B. All loops are executed the same number of times

C. The innermost loop

D. Cannot be determined without knowing the size of the loops

E. None of the above

3. One of the following is false on the code fragment given below:

if (a > b)

if (a < c)

cout << "One";

else

if (a== c)

cout << "Two";

else

cout << "Three";

else

cout << "Four";

cout << "Five";

A. displays "One" if and only if a is strictly between b and c

B. displays "Two" if and only if a and c are equal but b is less than both

C. displays "Three" if and only if a is greater than both b and c


D. displays "Four" if and only if a is less than b

E. displays "Five" in any case

F. the code has a syntax error and hence can't be executed at all

4. Assuming an appropriately declared array P and an int variable i initialized to 8, which one of the
following is true on the statement: P[++i] = i++;

A. P[8] is assigned the value 9

B. P[9] is assigned the value 9

C. P[8] is assigned the value 10

D. P[9] is assigned the value 10

E. None of the above

5. Which looping statement checks the test condition after executing the statement?

A. for

B. while

C. do-while

D. no looping statement checks the test condition at the end

E. all looping statements check the test condition at the end


6. What is wrong on the while construction below? While ((i < 10) && (i > 24);
A The logical operator && cannot be used in a test condition.
B. The <Statement> part is not provided.
C. The test condition is always false.
D. The test condition is always true.
E. None of the above.
Data Structures and Algorithm Analysis
7. The number of swapping needed to sort the numbers 10, 25, 6, 12, 36, 20, 2, 15 in ascending order,
using bubble sort is?
A. 11
B. 12
C. 13
D. 14
E. Can't be determined
8. Which one of the following is an example of a non-linear Abstract Data Type (ADT)?
9.
A. Tree
B. Stack
C. Queue
D. Linked List
E. None of the above
If deletion and insertion are the most frequent operations in an application, which data structure do
you recommend for this application?
A. Array
B. Tree
C. Linked List
D. Stack
10. Which one of the following is not a step in adding a node to a linked list?
A. Allocating memory for the new node.
B. Determining the insertion point.
C. Pointing the new node to the successor.
D. Pointing the predecessor to the new node.
E. Traversing the list.
11. Suppose you have a list of names sorted in alphabetical order, already sorted in one of the data
types below. The easiest way to print the names in reverse alphabetical order would be to use A.
Binary Search Tree.
B. Stack.
C. Queue.
D. Linked List.

12. What will be left on the stack after the following sequence of operations - push(A), push(B),
Push(C), pop(), push(A), push(B), push(C), pop(), pop(), push(B), push(C), pop() are

performed on an empty stack? [read the stack from left (bottom) to right (top)]

A. BABA

B. BCBC

C. ABAB

D. ACAC

E. None of the above

Object Oriented Programming in Java

13. Given the following main method of a java class, what would be the output when executed? public
class MSCTest(

public static void main(String [] args) {

int x=10;

switch (x) {

case 10: x++;


case 20: x++;

default: x++;

System.out.println(x);

A. 13 B. 10

C. 0

D. Compile time error, since there is no break in each of the case statement

E. Run time error

14. Which of the following is true about a class and an object?

A. A class is a template and an object is an instance of the template.

B. Objects of the same class must have all attributes/data members listed in the class. C. An object's
data value can be accessed through their reference.

D. Class is abstracted as a combination of important fields and behaviors.

E. All of the above.

15. Which of the following signature(s) is (are) invalid for the main() method of Java class?

(Choose all that apply.)

A. public static void main()

B. public static void main(String args[])

D. public static void main(String[] args)

E. public static int main(String[] arg)

for the constant PI?

16. Is it OK if a class definition implements two interfaces, each of which has the same definition

A. Yes, since the definitions are the same it will not matter.

B. No, a class may not implement more than one interface.


C. No, if a class implements several interfaces, each constant must be defined in only c
interface.
D. Yes, the more accurate definition of the two will override the other.
E. None of the above.
17. Considering Object Oriented best coding practices, which one of the following statements is
correct?
A. Minimizing the coupling between classes is one of the best design principle
B. Through Inheritance, classes can implement the "has a" kind of relationship
C. "Generalization - Specialization" relationship between classes increases coupling between classes
and should be avoided when possible
D. Cohesiveness of a class is a measure of how much methods the class defines
E. "Abebe is a Student" is a typical example for an inheritance relationship

Database Management Systems

19. E-R diagrams allow for


A. User access queries to be verified.
B. Relationships between entities to be modeled.

C. Physical file space requirements to be calculated.

D. A and C.
E.None of the above.
20. A 'null' value applied to an attribute implies that
A. The attribute must be either a primary or a foreign key
B. The attribute is critical to database integrity
C. The value of the attribute is known only to the database designer D. The actual value is not
currently significant

21. Which one of the following security mechanisms can be enforced without using a database
management system software?
A. Concurrency control
B. View (virtual table)
C. Firewall
D. Database user authorization
E. None of the above
22. The set of possible values that could be assigned for an attribute is called
A. Entity domain.
B. Candidate attribute.
C. Attribute domain.
D. Alternate key.
E. None of the above.
23. For a database designed using relational data model, which one of the following arguments is not
correct?
A. The order of tuples has impact on performance.
B. Duplicate tuples are not allowed in a relation.
C. Every relation must have a unique identifier.
D. Attributes of a relation can be ordered in any manner.
E. A relation can have more than one super key.
24. Referential integrity dictates that
A. The value of a primary key must appear in a foreign key of the related table. B. The value of a
primary key cannot appear in a foreign key of the related table. C. The value of a foreign key cannot
appear in a primary key of the related table. D. The value of a foreign key must appear in a primary
key of the related table. E. None of the above.
Software Engineering
25. Project indicator enables a software project manager to
A. Detect problem areas
B. track the status of an ongoing project
C. track potential risks
D. All of the above
26. Which of the following diagramming tool does not show the dynamic behavior of a system? A.
Class diagram
B. Communication diagram
C. Sequence diagram
D. Collaboration diagram
E. None of the above
27. What is configuration management in software engineering?
A. Management of the configurable components in a system
B. The identification of the configuration of a system at discreet points in time to control changes to
the configuration
C. Overall management of the design of the system

D. None of the above

28. The shortest time in which a project can be completed best describes

A. Slack time.

B. Critical path. C. Expected path. D. Optimistic path.

E. None of the above.


29. Which form of software development model is most suited to a system where all the requirements
are known at the start of a project and remain stable throughout the project?

A. Waterfall model

B. Incremental model

C. Evolutionary model

D. Spiral model

30. Acceptance tests are normally conducted by the

A, Test team.

B. Developer.

C. End users.

D. None of the above.

Operating Systems

31. Which of the following is not true about multithreading?

A. A process and its threads share address space, open files, and global variables.

B. Each thread has its own program counter, registers, and a stack.

C. Threads allow multiple executions to take place in the same process environment only when there
are multiple processors.

D. None of the above.

32. Which one of the following is not true about Process Table or Process Control Block?

A. There is one Process Control Block for each process.

B. It is a space on the hard disk used to store all relevant information about running processes. C. It
enables an interrupted process to resume normally.

D. It is used to store information such as process state, program counter, stack pointer, etc.

33. Which one of the following process (CPU) scheduling algorithms is most suitable for interactive
systems?

A. First-Come-First-Served

B, Shortest-Job First

C. Multilevel Queue

D. Round Robin

E. None of the above


34. Which one of the following in not true about

memory fragmentation?

A. Internal fragmentation can be reduced by memory compaction.

B. Internal fragmentation is created when the allocated memory is larger than the requested

memory.

C. External fragmentation is a condition in which total memory space exists to satisfy a

request, but it is not contiguous.

D. Internal fragmentation is a problem of all memory management methods.

35. Which of the following criterion of scheduling algorithms is the most important for interactive

users?

A. Efficiency

B. Response time

C. Turnaround time

D. Throughput

36. Which one of the following is not true about malware (malicious software)?

A. A trojan horse refers to modifying a normal program to do extra (undesirable) things in addition to
its usual function and arranging for the victim to use the modified version. B. A virus is a program by
its own that replicates itself through files.

C. A worm is a program by its own that replicates itself in networks. D. All of the above.

Computer Networking

37. Which of the following is the correct order of the OSI model from top to bottom? A. Physical,
Network, Data Link, Session, Transport, Application, Presentation B. Application, Presentation,
Session, Transport, Network, Data Link, Physical C. Physical, Data Link, Network, Transport, Session,
Presentation, Application D. Application, Session, Presentation, Transport, Network, Data Link,
Physical

E. None of the above

38. A subnet mask is a bit pattern that specifies which portion of the IP address represents a Subnet
Address. Which of the following is true about TCP/IP subnet masks?

A. They are used to mask the portion of the IP address so that TCP/IP can distinguish the
Network ID from the Host ID.

B. They are used to mask a portion of the IP address so that TCP/IP can distinguish the WINS server
address from the Default Gateway address.

C. They are used to mask a portion of the IP address so that TCP/IP can distinguish the DNS address
from the host address.

D. Subnet mask is a 32 bit binary number with a stream of x binary 0 bits followed by a stream of 32-x
binary 1 bits.

39. Which one of the following is true about packet switching?

A. A dedicated physical path between the sender and the receiver is required. B. All packets belonging
to the same message travel through the same route.

C. All packets belonging to the same message arrive in their order of transmission by the

source.

D. A node crash in the communication system is fatal and stops communication.

E. It is a store-and-forward transmission mechanism.

40. What is the size of an IP Version 4 Address?

A. 64 bits

B. 128 bits

C. 4 bits

D. 32 bits

E. 16 bits

41. What is a DHCP Server?

A. A network device that assigns IP addresses inside a network.

B. Another name for a hub.

C. A MAC address filter that specifies the time that a NIC will try to negotiate a connection speed
before resetting the port.

D. The device that filters content for web browsers on a network.

E. A network device that resolves domain names to IP addresses.

42. Which of the following connection methods would not be used to connect devices between two
different offices?

A. Twisted pairs B. Fiber-optics C. Coaxial cables D. Infrared

Web Technologies

43. Which technique is referred to as inline scripting?

A. The use of SCRIPT tags in line with the HEAD and BODY tags.

The embedding of scripting instructions within certain HTML tags. C. The addition of the INLINE tag
within the controlling HTML. D. Referring to a style stored in other place.

44. Which of the following is not true about CSS technology?

A.

It allows configuration for an entire web site from just one external file. B. It results in smaller web
pages.

C.

It separates formatting from the actual content of the page. D. None of the above.

45. Which of the following correctly describes the "well formed" concept of an XML document?

A. An XML document has root elements.

B. An XML document contains elements.

C. An XML document must contain one or more elements and root element must contain all other
elements.

D. None of the above.

46. Which of the following is false about HTTP 1.1?

A. Enables the sharing of TCP connection among set of objects in a page

B. It allows client application to request for resource without waiting for the response of another
application that had requested and share TCP connection

C. It forces each object in a page to create three way handshake TCP connection to get

resource

D. None of the above

47. Which one of the following information is not contained in HTTP replies message?

A. Server
B. B. Connection

C. Host

D. D. Content type

48. What is the difference between GET and POST method?

A. GET displays the form element values as query string in the URL of the address bar where

as POST does not.

B. POST displays the form values entered in the URL of the address bar whereas GET does

not.

C. There is no difference

D. None of the above

1. B. The actual memory requirement of an array must be known before the compiler translates the
source code.

2. C. The innermost loop

3. F. the code has a syntax error and hence can't be executed at all

4. E. None of the above

5. C. do-while

6. C. The test condition is always false.

7. C. 13

8. A. Tree

9. C. Linked List

10. E. Traversing the list.

11. B. Stack.

12. D. ACAC

13. A. 13

14. A. A class is a template and an object is an instance of the template.

15. A. public static void main()

16. C. No, if a class implements several interfaces, each constant must be defined in only one interface.

17. A. Minimizing the coupling between classes is one of the best design principles

19. B. Relationships between entities to be modeled.


20. D. The actual value is not currently significant

21. C. Firewall

22. C. Attribute domain.

23. D. Attributes of a relation can be ordered in any manner.

24. A. The value of a primary key must appear in a foreign key of the related table.

25. D. All of the above

26. A. Class diagram

27. B. The identification of the configuration of a system at discreet points in time to control changes
to the configuration

28. B. Critical path.

29. A. Waterfall model

30. C. End users.

31. C. Threads allow multiple executions to take place in the same process environment only when
there are multiple processors.

32. B. It is a space on the hard disk used to store all relevant information about running processes.

33. D. Round Robin

34. C. External fragmentation is a condition in which total memory space exists to satisfy a request,
but it is not contiguous.

35. B. Response time

36. B. A virus is a program by its own that replicates itself through files.

37. B. Application, Presentation, Session, Transport, Network, Data Link, Physical

38. A. They are used to mask the portion of the IP address so that TCP/IP can distinguish the Network
ID from the Host ID.

39. E. It is a store-and-forward transmission mechanism.

40. D. 32 bits

41. A. A network device that assigns IP addresses inside a network.

42. D. Infrared

43. B. The embedding of scripting instructions within certain HTML tags.

44. B. It results in smaller web pages.


45. C. An XML document must contain one or more elements and root element must contain all other
elements.

46. E. None of the above. (HTTP 1.1 does not have a specific feature mentioned in the options)
In this channel, I post Computer Science (Comp Sci), So ware Engineering (SWENG), Ar ficial Intelligence (AI),
Informa on Technology (IT) and Data Science (DS) MSc. files for my brilliants, 'cause I love them.

✅ YouTube▶: www.youtube.com/dagmawiabate
✅ LinkedIn : www.linkedin.com/in/dagmawiabate
✅ Instagram : www.instagram.com/dagmawi.abate || www.threads.net/dagmawi.abate
✅ TikTok : www. ktok.com/@dagmawiabate
✅ Twi1er : www.twi1er.com/dagmawiabate
✅ GitHub : www.github.com/dagmawiabate
✅ Snapchat : www.snapchat.com/@dagmawi.abate
✅ Telegram✈: www.t.me/dagmawi_abate

You might also like