0% found this document useful (0 votes)
69 views19 pages

Jku Cs IT - Model Exam Take Exam

The document contains a practice exam with multiple choice questions about computer science topics like Java, databases, operating systems, and web development. It tests knowledge of concepts like method overloading, query optimization techniques, transaction properties in databases, and PHP functions.

Uploaded by

kayisledesta
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)
69 views19 pages

Jku Cs IT - Model Exam Take Exam

The document contains a practice exam with multiple choice questions about computer science topics like Java, databases, operating systems, and web development. It tests knowledge of concepts like method overloading, query optimization techniques, transaction properties in databases, and PHP functions.

Uploaded by

kayisledesta
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/ 19

Jku cs exam

1. One of the following statements is false

A) Method overloading is resolved at compile time

B) Method overriding is resolved at run time

C) Overridden methods coexist in the same class

D) Overloaded methods have the same name but different signature

2. Among the following, which one is not a feature of Java?

A) Robust

B) Structured

C) Distributed

D) High Performance

3. Which one of the following statements is wrong about a web page?

A) The content of a static web page can only change if the source code is changed.

B) The content of a dynamic page may change in response to users’ actions.

C) An application that collects data from users through a form and stores it in a database
requires the integration of client & server-side scripts

D) Source code of a program written in a server-side scripting language is visible on a client


application such as a browser

4. Suppose String S=null; then what type of exception will occur when we execute the statement
System.out.println(S.charAt(0));

A) ArithmeticException

B) OutOfMemoryError

C) NumberFormatException

D) NullPointerException

5. Which one of the following scheduling algorithms is both preemptive and non-preemptive?

A) Round Robin

B) Priority

C) FCFS

D) SJF

6. Which mode of transmission the entire capacity of the channel can be utilized for each direction?

A) Simplex

B) Half duplex

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
C) Full duplex

D) all except A

7. The activity of choosing an efficient execution strategy for processing a query is called
as____________?

A) Query execution

B) Query plan evaluation

C) Query optimization

D) Query parsing

8. Which types of switching each node receives the entire message, stores it, and then transmits it to
the next node?

A) Circuit Switching

B) Packet Switching

C) Message Switching

D) all

9. What happens if several catch blocks match the type of the thrown exception?

A) All the catch blocks for that try statement are executed in order.

B) The first catch block is executed and the others are skipped.

C) All the catch blocks for that try statement are skipped.

D) The program will terminate without executing any of the catch blocks.

10. The DBMS acts as an interface between what two components of an enterprise-class database
system?

A) Database application and the database

B) Data and the database

C) The user and the database application

D) Database application and SQL

11. One of the following is false statement about uses of servlet

A) Processing and storing data submitted by HTML form.

B) Providing dynamic content.

C) Used to handle multiple requests concurrently

D) Processing and returning data to user in HTML form only.

12. 15. what will be the output of the following program? A. 9 B. 81 C. 27 D. 3

A) 9

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
B) 81

C) 27

D) 3

13. Which one of the HTML5 attributes makes a text box inactive to edit? A. B. C. D.

A) required

B) pattern

C) read-only

D) disable

14. A variable declared _____ has a GLOBAL SCOPE?

A) outside program

B) inside function

C) outside function

D) None Of the Above

15. Which Java statement always executes its body at least once, even though the condition is not
true?

A) for

B) do-while

C) while

D) continue

16. Software and hardware that uses hypertext Transfer Protocol to respond to client requests is -----?

A) ile server

B) mail server

C) web server

D) A and C

17. One of the following is not true about inheritance?

A) Inheritance is used for code reusing

B) In inheritance the sub class can introduce its own specific variables

C) A super class can access its own sub classes unique data members

D) Java uses the word extends to implement inheritance

18. Features of Java used to handle more than one job at a time.

A) Distributed

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
B) Platform-Independent

C) Portable

D) Multi-threaded

19. Which one of the following is not necessary condition for deadlock to occurred?

A) Hold and Wait

B) Mutual inclusion

C) No- preemption

D) Circular wait

20. Which TCP/IP layer allows an IP packet to make a physical link to transmission media?

A) Application layer

B) Internet layer

C) network access layer

D) transport layer

21. A process stack does not contain __________

A) Function parameters

B) Local variables

C) Return addresses

D) PID of the child process

22. One of the following is not the reason for the need of query optimization?

A) To utilized storage space efficiently

B) To increase system performance

C) To maximize throughput

D) To increase response time

23. Which of the following is not common member to both abstract classes and interfaces?

A) static variables

B) final variables

C) private members

D) abstract methods

24. Given a class named Student, which of the following is a valid constructor declaration for this class?

A) Constructor Student ( ) { }

B) public Student ( ) { }

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
C) Student Student ( ) { }

D) Void Student ( ) { }

25. Which one of the following statements is True about operating systems as an I/O manager?

A) Control all the computer I/O devices.

B) Issue commands to I/O devices, catching interrupts and handling errors

C) Provide an interface between the device and the rest of the system.

D) All

26. Identify the correct statement based on the code snippet given below. $fop=fopen(“xyz.txt”,”a+”);
fwrite($fop,”hello”); fclose($fop);

A) xyz.txt file is opened for reading only

B) the text hello will be appended to the existing content in xyz.txt file

C) the text hello won’t be written to xyz.txt file, if the file does not exist

D) xyz.txt file is opened for write-only access

27. To ensure integrity of the data, a database system should ensure transactions to possess certain
properties. The property which makes sure that the partial effects of incomplete transactions should not
visible to the other transactions is called__________?

A) Atomicity

B) Isolation

C) Consistency

D) Durability

28. which one of the following is the result of the following PHP code? Given Code: echo strlen(“IP II
Model-Exam !”);

A) 20

B) 18

C) 16

D) 15

29. Which layer allows an IP packet to make a physical link to the media?

A) Internet layer

B) Network access layer

C) Transport layer

D) Application layer

30. Which Java keyword cannot appear on instance variable declaration?

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) private

B) static

C) public

D) string

31. Assume Mr. Daniel is running different applications at the same time like browsing the internet
while preparing his assignment, so which type of operating system he used.

A) ROTS

B) Multi-tasking

C) Multi-user

D) DOS

32. Based on the code snippet given below, which one of the following statements allow you to assign
an email submitted from the form to a variable called email? UserEmail

A) $email= $_GET[“email”];

B) $email= $_POST[“email”];

C) echo $_REQUEST[“email”];

D) $email= $_REQUEST[“UserEmail”];

33. One of the following is not consider in cost estimation during query optimization?

A) Input/Output cost

B) Communication cost

C) CPU processing cost

D) Device cost

34. Among the following lists one doesn’t describe a field in a relation?

A) Record

B) Attributes

C) Column

D) All of them

35. Choose the lists of the keywords in order that they would be used to handle exceptions in Java.

A) catch, try, finally

B) try, catch, finally

C) finally, catch, try

D) try, finally, catch

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
36. If a process runs, out of the extra space allocated to it, then which action is not taken by the
system?

A) It will have to be moved a process to a partition having a small space.

B) Swapped out of memory until a large enough hole can be created

C) Kill the process.

D) All

37. Which of the following primitive data types is not Integer type?

A) byte

B) double

C) int

D) short

38. Which one of the following is wrong about structural and object-oriented programming paradigms?

A) Structural Programming can solve moderate problems

B) Object-Oriented Programming provides data hiding

C) Structural Programming does not provide data hiding

D) Structural Programming support code reusability

39. What is the use of isset() function in PHP?

A) The isset() function is used to check whether a variable is set or not

B) The isset() function is used to check whether a variable is free or not

C) The isset() function is used to check whether a variable is a string or not

D) The isset() function is used to set a new value to a variable

40. One of the following is not true statement.

A) Class is an entity that contains both data and methods.

B) new operator used to create object from a given class

C) C. In java new operator used to declare variable that used to store single value

D) D. Classes are model of a given problem domain.

41. Which one of the following is the output of the given program? $m) { if($k!=2) continue; else echo
$m; } ?>

A) 0134

B) Nov

C) 2

D) SeptOctDecJan

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
42. Which one of the following statements is the correct way of defining a CSS style using a class
selector?

A) p,h1,h2,li { text-align: center; color: red; }

B) p { background: yellow; color: red; }

C) #par{ background: yellow; color: red; }

D) .par { background: yellow; color: red; }

43. Which one of the following PHP functions is used to redirect a user to a specific page?

A) Send_redirect()

B) header_location()

C) header()

D) redirect()

44. Which one is the right name given for unique identification of each entity?

A) Composite Key

B) Primary Key

C) Foreign key

D) Candidate Key

45. Which coding transition is at the middle of the bit and changes phase when a different bit is
encountered?

A) Differential Manchester

B) Manchester

C) Delta modulation

D) Pulse code modulation

46. Which of the following is not primitive data type in Java?

A) String

B) long

C) Boolean

D) int

47. The velocity of propagation of a signal through a guided medium varies with frequency. This type
transmission impairment is called……………………………?

A) Noise

B) Attenuation distortion

C) Delay distortion

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
D) B and C

48. Among the following one describes the functional dependency between non-key attributes of a
relation?

A) Functional data dependency

B) Partial functional data dependency

C) Full functional data dependency

D) Transitive functional data dependency

49. _______is methods assume conflict is rare and only checks for conflicts at commit/terminate time?

A) Shared Locking

B) Optimistic

C) Time stamping

D) Executive locking

50. ______is a rule of no component of the primary key may contain a NULL value.

A) Entity integrity

B) Referential integrity

C) Domain Integrity

D) Cardinal integrity

51. Which one of the following is used to display an output in PHP?

A) document.write()

B) out.print()

C) print()

D) write()

52. Among the following one is the process of analyzing the given relation schemas based on their
functional dependencies and primary keys.

A) Decomposition

B) Normalization

C) Partitioning

D) Distributing

53. _________are rules that should be obeyed or followed while manipulating the data?

A) E-R diagram

B) Entity

C) Relationship

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
D) constraints

54. A program written in _________ language does not require a server to run.

A) PHP

B) Servlet

C) JSP

D) HTML

55. One of the following statements is false

A) An exception is a compile time error

B) In java there are predefined classes that used to handle exceptions

C) In exception handling technique an exception object contains expected error information

D) Exception handling mechanism decreases your program performance

56. Which one is false about abstract class and interface in Java?

A) An interface cannot have instance variables.

B) In Java, an Interface cannot be final

C) There can be non-abstract methods within abstract class.

D) We can define private modifier for variables in interfaces.

57. Which of the following OOP concept binds the code and data together and keeps them secure from
the outside world?

A) Polymorphism

B) Inheritance

C) Abstraction

D) Encapsulation

58. From the following list of Java variables; which one is invalid?

A) EMP_Salary

B) Age27

C) My-Name

D) _1200IDN

59. Which one of the following PHP functions is used to execute SQL queries?

A) mysqli_select_db()

B) mysqli_fetch_assoc()

C) mysqli_execute_query()

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
D) mysqli_query()

60. Which method execute first when you run Servlet code?

A) Service ( )

B) destroy ( )

C) init( )

D) start( )

61. A class declaration that begins with the keyword ____________ must be stored in a file that has
exactly the same name as that class and ends with the .java file-name extension.

A) private

B) final

C) public

D) abstract

62. Which layer allows an IP packet to make a physical link to the media?

A) Internet layer

B) Network access layer

C) Transport layer

D) Application layer

63. Based on the html code given below identify the correct statement. Given Code:

Hello Everyone

A) is an end tag and has no problem if we forget it

B) “Hello Everyone” is an element that will be displayed on the browser in red color

C) “style” is a CSS property D. style=“color:red;”> is an

D) style=“color:red;”> is an internal CSS

64. Which one of the following is correct statement?

A) Both unipolar encoding and polar encoding techniques are NRZ.

B) Both NRZ-L and NRZ-I changes voltage level when different bit is encountered

C) NRZ-I changes voltage level at when a different bit is encountered

D) NRZ-L changes voltage when a 1 is encountered.

65. Which one of the following statements is False about segmentation and paging?

A) In segmentation segments size is unequal and dynamic.

B) In paging the virtual address space is divided into equal-sized block called pages frame.

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
C) Pages and page frames should have the same size.

D) To map each page into frames we need a special data structure called page table

66. __________is a technique/process of keeping and maintaining a log file of all transaction changes
made to database to enable effective recovery in event of failure?

A) Journaling

B) View

C) Backup

D) Encryption

67. Timestamp ordering protocol is said to be free from deadlock because of ____ reason?

A) It is cascading free

B) No transaction is made to wait

C) It guarantees serializability

D) None of them

68. One of the following is false about Java database connectivity (JDBC)

A) It allows you to create Java application that can access data from different types of database
systems.

B) It used to connect Java standalone applications with back-end database servers.

C) It uses different predefined java classes and methods to handle various data access
functions.

D) Different database systems can use the same JDBC driver, which used to establish the
connection interface.

69. Which keyword is used to prevent content of a variable from being modified?

A) final

B) last

C) constant

D) static

70. Which one of the following statements is True about operating systems?

A) It provides a platform on which application software can be installed on the bottom.

B) It controls the overall functionality of the computer system.

C) It primarily focuses on managing the hardware resource rather than software resources.

D) We can use a computer, even if a computer has no installed operating system.

71. Transaction-processing systems usually allow multiple transactions to run concurrently. Which of
the following best suits as the advantage(s) of allowing concurrent execution of transactions?

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) Improved transaction throughput

B) Serializability

C) Reduced execution complexity

D) Reduced waiting time

72. Which one of the following subnet masks represents class A before and after subnetting?

A) 255.0.0.0

B) 255.255.0.0

C) 255.255.255.0

D) all

73. Which mode of transmission the entire capacity of the channel can be utilized for each direction?

A) Simplex

B) Half duplex

C) Full duplex

D) all except A

74. If a transaction is allowed to read a data item that was produced by an uncommitted transaction,
what do we call this read?

A) Repeatable read

B) Dirty read

C) Phantom read

D) Conflict read

75. ______is s a problem which occurs when two transactions access the same data items concurrently
and their operations interleaved.

A) Loss Update

B) Incorrect summery

C) Temporary read

D) Unrepeatable read

76. which one of the following syntaxes is the correct way of defining a function in PHP?

A) functionName(parameters) {function body}

B) function {function body}

C) function functionName(parameters) {function body}

D) ata type functionName(parameters) {function body}

77. Which of the following is not a java.util.Scanner method?

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) nextInt()

B) next()

C) nextLine()

D) nextString()

78. 6. Which of the following is the default file extension of PHP? A. B. C. D.

A) .php

B) .hphp

C) .xml

D) .html

79. Identify false statement among the given.

A) Several classes can be declared as sub classes of the same super class

B) Several classes can share the same variable.

C) When we create an object of a sub class, constructor of a subclass executed first and then
constructors of super class

D) In inheritance we can have more than one sub class

80. For recovery purposes, the transaction processing system not needs to keep ______________?

A) The beginning of transaction

B) The operation not performed

C) The ending of the transaction

D) Transaction status(committed/aborted)

81. Which of the following is true about Java static methods and instance methods?

A) Instance methods belong to the class rather than the object of a class.

B) Instance methods can be invoked without the need for creating an instance of a class.

C) A static method can access static data member and can change the value of it.

D) Static methods require an object of its class to be created before it can be called.

82. Which one of the following wireless transmission systems the sending and receiving antennas need
not be aligned?

A) Microwave

B) Radio waves

C) Infrared waves

D) Bluetooth

83. which one of the following statements is wrong about a session?

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) It is used to make data accessible across all pages of a website

B) echo $_SESSION[“email”]; is used to display the value of a session variable called email.

C) session_start() function is used to start a session and must be there at the beginning of an
index.php page of the website

D) session_unset() function destroys all session variables

84. What will happen when we run the following segment of Java code? public static void main(String
args[]){ int i; int []a={3,4,0,5}; for( i=3;i>=0;i--){ System.out.print(30/a[i]); System.out.print(a[i]); }

A) Array elements 3 4 0 5 will be printed

B) 10 7 0 6 will be printed

C) Compile Error will occur

D) 10 7 0 6 3 4 0 5 will be printe

85. ________means the transaction happens indivisibly; a transaction either happens completely or
not at all.?

A) Isolated

B) Atomicity

C) Consistency

D) Durability

86. Which one of the following is used for only local communication in private network?

A) 172.16.6.2

B) 10.123.16.145

C) 192.168.14 23

D) All

87. Which one of the following is not an access modifier in Java?

A) void

B) protected

C) public

D) private

88. One of the following is not the end result of abstraction in OOP?

A) Possible attributes

B) Possible methods

C) Possible class

D) Well Organized codes

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
89. Which of the following keyword is used to refer the member of base classes from a subclass?

A) base

B) super

C) this

D) upper

90. __________ keyword is used to exit from Java loop statements.

A) continue

B) quit

C) break

D) exit

91. Concept of OOP that provides code reusability is _______

A) Polymorphism

B) Inheritance

C) Encapsulation

D) Abstraction

92. One of the following is true about relational database data model?

A) Navigational nature of processing.

B) Visualized as a linear arrangement of records

C) Little scope for query optimization

D) High scope of query optimization

93. One of the following is true statement about constructors?

A) Constructors are methods of a given class which used to create objects

B) Constructors are special attributes

C) Constructors have the same name as class name and can return values

D) A class can’t have more than one constructor

94. Which one of the following is the correct way of creating a PHP variable?

A) int stud_age=20;

B) $stud-age=20;

C) stud_age=20;

D) $_age=20;

95. Choose the correct statement about Java variables.

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) Variable names can start with a digit.

B) Some Java keywords can be used as naming a variable

C) Variable names can contain digits 0-9.

D) All variables cannot be changing its value during execution

96. Which connectivity device packets send to all connected device at the same time?

A) Switch

B) router

C) Hub

D) Bridges

97. Which one of the following statements is the right way of creating a cookie called product that can
only stay for 2?

A) createcookie(“product”,”smart phone”,time()+(60*60*14),”/”,”localhost”,0);

B) setcookie(“product”,”smart phone”,time()+(60*60*2*24),”/”,”localhost”,0);

C) setcookie(“product”,”smart phone”,time()+(60*60*24*14),”/”,”localhost”,0);

D) setcookie(“product”,”smart phone”,time()+(60*60*24),”/”,”localhost”,0);

98. Based on the above question #13, what is the broadcasting address for subnet #2?

A) 178.191.0.255

B) 178.191.255.255

C) 178.191.12.255

D) 178.191.1.255

99. Unshielded twisted pair cable that is used for 16 Mbps Token Ring is ---------------------

A) Category 5

B) Category 6

C) Category 4

D) Category 3

100. Which one of the following statements is True about process state transition?

A) If the given quantum time expired a running process can be interrupted and goes to the
ready queue.

B) When a process is created it goes to a ready state immediately.

C) When a process successfully finished its task, it goes to a terminated state

D) all

101. One of the following is/are the recovery technique from catastrophic failures?

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
A) Undo

B) Backup

C) Redo

D) Encryption

102. The built-in base class in Java, which is used to handle all exceptions is:

A) Exception

B) Runtime Exception

C) Checked Exceptions

D) Unchecked Exception

103. In a schedule S with two transactions T1 and T2, T1 reads the data item which was produced by T2
and T1 commits before T2 commits. In this case, the schedule S is said to be a _________ schedule?

A) Recoverable

B) Conflict serializable

C) Non-recoverable

D) Serial

104. An entity that cannot stand by itself or that cannot have a record unless there is another entity to
be related with it is for its existence is called?

A) strong Entity

B) Weak entity

C) dependent entity

D) Independent

105. Which wireless security method generates new keys each time when a client establishes
connection to the router?

A) Wi-Fi Protected Access

B) Extensible Authentication Protocol

C) Wired Equivalency Protocol

D) Traffic Filtering

106. In which condition the finally block will not be executed?

A) When Exception occurs and not handled

B) When System.Exit() is called

C) When Exception does not occur

D) When Exception occurs and handled

By candidate kayisle k jku cs student date 04/09/2016E.c


Jku cs exam
107. If we want to develop a program to display the names of 7 days in a week, what type of Java
statement can be appropriate to solve the problem?

A) if…else if

B) for loop

C) nested if

D) if…else

108. _____________ is a program that executes compiled Java bytecode on a specific platform.

A) NetBeans

B) JVM

C) JDK

D) JRE

109. Which one of the following database models under record database model category?

A) Hierarchical Database Model

B) Network Database Model

C) Relational Database Model

D) all of them

110. Which of the following is correct way of inheriting interface A by class B?

A) interface A implements B {}

B) class B implements A {}

C) class B extends A {}

D) interface B extends A {}

By candidate kayisle k jku cs student date 04/09/2016E.c

You might also like