| Post Name | Programmer - Kerala Public Service Commission |
|---|---|
| Question Paper Code | 084/2024/OL |
| Category Code | 725/2023 |
| Date of Test | 11 July 2024 |
| Exam Type | Online Examination |
| Total Questions | 100 |
1
The contrapositive of the statement "If it is raining, then I get wet" is
Answer
A. If I do not get wet, then it is not raining
2
The expression [{(A ∪ B) ∩ C}ᶜ ∪ (B ∩ Cᶜ)]ᶜ is equivalent to:
Answer
B. B ∩ C
3
The number of relations from A = {a, b, c} to B = {1, 2} is
Answer
C. 64
4
The minimal element of the partially ordered set A = {x/x is a real number and 0 ≤ x < 1} with the usual partial order ≤ is
Answer
B. 0
5
A TV survey shows that 60% people see programme A, 50% see programme B, 50% see programme C, 30% see programme A and B, 20% see programmes B and C 30% see programmes A and C, and 10% do not see any programme. Find what % see programmes A, B and C.
Answer
A. 10
6
The probability of drawing a spade from a pack of cards is
Answer
D. 1/4
7
If a bag contains 8 white and 6 red balls, then the probability of drawing two balls of the same colour is
Answer
D. 43/91
8
A problem in Physics is given to three students A, B, C whose chances of solving it are 1/2, 3/4, 1/4 respectively, then the probability that the problem will be solved is
Answer
C. 3/32
9
Suppose that a bag X contains 2 white and 3 red balls and a bag Y contains 4 white and 5 red balls. One ball is drawn at random from one of the bags and is found to be red, then the probability that it was drawn from the bag Y
Answer
B. 25/52
10
If the correlation coefficient is -1, then the angle between the two regression lines is
Answer
D. 0 or π
11
If in a partially destroyed laboratory record of an analysis of a correlation data, the regression equations are given as 4x - 5y + 33 = 0, 20x - 9y = 107, then the coefficient of correlation between x and y is
Answer
A. 0.6
12
If a sample of 200 items drawn from a large population, the mean is 65 and the SD is 8, then the 95% confidence limits for the population means are (critical value of z=1.96 for α = 0.05)
Answer
A. (63.8, 66.1)
13
(X'+Y)(X+Y) =
Answer
C. Y
14
Write the minimized expression for the following logic function using K-map F(P,Q,R) = Σm(0, 1, 2, 4, 6)
Answer
B. P'Q'+R'
15
How many flip-flops are required for a mod-9 counter ?
Answer
D. 4
16
What is the addressing mode of the instruction MOV AX, [BX] ?
Answer
C. Register indirect addressing mode
17
What is the size of the pre-fetch queue in a 8086 microprocessor ?
Answer
A. 6 bytes
18
How many address bits are required to address a location in a memory of size 512 KiloBytes ?
Answer
D. 19
19
Name the policy when a cache performs a write operation on a shared memory block it marks all other copies of that block in other caches as invalid ?
Answer
B. Write invalidate
20
After the completion of a DMA transfer, the processor is noticed by ______________
Answer
A. Interrupt signal
21
Which of the following register is used the holding instruction/data read from memory ?
Answer
C. Memory Data Register
22
Which of the following CPU scheduling algorithm may lead to starvation ?
Answer
B. Shortest Job First
23
Which of the following is a deadlock detection method ?
Answer
A. Wait-for graph
24
What kind of fragmentation will be there in fixed partitioned memory management ?
Answer
C. Internal & External
25
Which of the following disk scheduling algorithm is known as Elevator algorithm ?
Answer
B. SCAN
26
In the Readers-Writers problem, what kind of semaphore is typically used to ensure exclusive access in the shared resource for writers while allowing multiple readers to access the resource concurrently ?
Answer
A. mutex
27
Given the following sequence : {2, 3, 5, 6, 9, 11, 15}, which sorting algorithm will run in O(n) time (n comparisons)
Answer
A. Insertion Sort
28
What is the worst case running time of the following pseudocode functions in Big-Oh notation in terms of the variable n?
int abc(int n, int m) {
if (m<2) return m;
if (n<1) return n;
else if (n<10)
return abc(n/m, m);
else
return abc(n-1, m);
}
Answer
B. O(n)
29
Which in the following is a pre-order traversal of a valid BST ?
Answer
B. 11, 4, 2, 7, 17, 20, 25
30
Consider the following statements A : Given an array of n integers, each belonging to {-1, 0, 1}, we can sort the array in O(n) time in the worst case B : The following array is a max heap : [10, 3, 5, 1, 4, 2]. Choose the correct option A : True. Use counting sort B : False. The element 3 is smaller than its child 4, violating the maxheap property
Answer
A. Only A is true
31
The preorder traversal sequence of a binary search tree is 30, 10, 15, 25, 23, 27, 40, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree ?
Answer
B. 23, 27, 25, 15, 10, 35, 39, 42, 40, 30
32
Consider the following statements : A : The problem of finding the shortest path from s to t in a directed, weighted graph exhibits optimal substructure. B : It is possible for DFS on a directed graph with a positive number of edges to, produce no tree edges Choose the correct option
Answer
C. Both A and B are true
33
An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is
Answer
A. θ(1)
34
Suppose A, B, C, D, E are sorted arrays having lengths 20, 24, 30, 35, 50 respectively. They are to be merged into a single arrays by merging together two at a time. The number of comparisons in the worst case by the optimal algorithm
Answer
A. 358
35
Consider the following statements A : There exists an algorithm to build a binary search tree from an unsorted list in O(n) time B : On a connected, directed graph with only positive edge weights, Bellman-Ford runs asymptotically as fast as Dijkstra Choose the correct option
Answer
D. Both A and B are false
36
What is the minimum number of nodes in a full tree of height 6 ?
Answer
B. 13
37
The postorder traversal of a binary search tree is 1, 12, 4, 22, 18, 16. What is the new postorder traversal after the insertion of 10 and 14 ?
Answer
C. 1, 10, 14, 12, 4, 22, 18, 16
38
What is the scope of a variable declared with the 'static' keyword inside a function ?
Answer
A. Local to the function, retaining its value between calls
39
In C++, Access Rights of Derived Classes, with protected inheritance the minimum access level for the members of derived class that are inherited from the base class is
Answer
C. only the public members inherited from the base class can be accessed in the derived class as protected members
40
What is the output of the following code ? #include using namespace std; class Something{ char *name; public: Something(char*n) { name=n, cout << "Creating"<< name <<'\n'; } ~Something() {cout << "Destroying" << name <<'\n';} }; int main(int argc, char **argv) { Something x("x"), y("y"); Something *z=new Something("z"); Something w("w"); {Something v("v");} delete z; }
Answer
B. Creating x Creating y Creating z Creating w Creating v Destroying v Destroying z Destroying w Destroying y Destroying x
41
What is the output of the following code ? #include using namespace std; class Employer { char *name; public: Employer(char *n) : name(n) {} word print(ostream&os) const {os << name;} }; ostream & operator << {ostream & os, const Employer & e){ e.print(os); return os; } class RichGuy : public Employer { int stocks; public: RichGuy(char*n, int s) : Employer(n), stocks(s) {} void print(ostream &os) const { Employer::print(os); os << "(this guy has "<< stocks <<" stocks!!)"; } }; int main(int argc, char **argv) { RichGuy bill("Bill Gates", 1576354987); cout << bill <<"\n"; }
Answer
A. Bill Gates
42
#include #include using namespace std; class Function { public: virtual double eval(double x) = 0; double derivative(double x, double e) { cout << "Function::derivative\n"; return (eval(x+e)-eval(x-e))/(2*e); } virtual double derivative(double x) {return derivative(x,0.001);} }; class Oscillating : public Function { double a, b, c; public: Oscillating(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {} double eval(double x) {return a*sin(b*x+c);} }; class Quadratic : public Function { double a, b, c public: Quadratic(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {} double eval(double x) {return c+(b + a*x)*x;} double derivative(double x) {return b + 2*a*x;} }; int main(int argc, char *argv){ Oscillating f(2, 3, 4); cout << f.derivative(2)<<"\n"; Quadratic q(5, 4, 5); cout <
Answer
B. Function::derivative -5.03442 24
43
#include using namespace std; classCSquare classCRectangle{ int width, height; public: int area() {return(width*height);} void convert (CSquare a); }; class CSquare { private: int side; public: void set_side (int a) {side=a;} friend class CRectangle; }; void CRectangle::convert (CSquare a) { width = a.side; height = a.side; } int main() { CSquare sqr; CRectangle rect; sqr.set_side(4); rect.convert(sqr); cout << rect.area(); return 0; }
Answer
C. 16
44
you have two pairs: new() and delete() and another pair : alloc() and free(). Choose the correct difference between new() and malloc()
Answer
D. "new" will initialize the new memory to 0 but "malloc()" gives random value in the new allotted memory location
45
#include #include #include using namespace std; void func(int c) { if(c :: max()) throw invalid_argument("MyFunc argument too large."); else { cout<<"Executed"; } } int main() { try { func(256); } catch(invalid_arguments& e) { cerr <
Answer
B. Executed
46
What is the output of the java code given below : import java.lang.*; //bit operations public class ShowBits { public static void main(String args[]) {byte b = -5; for (int i = 7; i>=0; i--) { if ((b & 0x80)==0) System.out.println("bit" + i + "is 0"); else System.out.println("bit" + i + "is 1"); b<<=1; } } }
Answer
A. bit 7is 1 bit 6is 1 bit 5is 1 bit 4is 1 bit 3is 1 bit 2is 0 bit 1is 1 bit 0is 1
47
Find the wrong statement on Java exceptions
Answer
C. This search continues on outward, until eventually the exception is handled and eventually it stays in loop. It does not terminate.
48
Present the following under the heads "Static Methods" and "Instance Methods" of java Thread Class i) getPriority(); ii) SetPriority(); iii) start(); iv) stop(); v) sleep(); vi) yield(); vii) run(); viii) isAtive(); ix) suspend(); x) activeCount(); xi) currentThread(); xii) resume(); xiii) join();
Answer
C. Static Methods : v), vi), x), xi), Instance Methods : i), ii), iii), iv), vii), viii), ix), xii), xiii)
49
The method that is not called during the life cycle of an applet is
Answer
C. main()
50
What is the output of the following Vehicle.java code ? class Vehicle{ void run(){System.out.println("Vehicle is running");} public static void main(String args[]){ Bike2 obj=new Bike2(); obj.run(); } } class Bike2 extends Vehicle{ void run(){System.out.println("Bike is running safely"); } }
Answer
B. Bike is running safely
51
In a relational database, how does a super key differ from a candidate key ?
Answer
D. A super key can contain redundant attributes, whereas a candidate key is a minimal set of attributes that uniquely identify a record
52
In an ER diagram, which of the following symbols will typically not be adjacent to each other directly ?
Answer
D. Oval and Double Diamond
53
Consider a relation R(A,B,C,D) with the following functional dependencies : •A→B •B→C •C→D What is the highest normal form (NF) that the relation R satisfies ?
Answer
B. Second Normal Form (2NF)
54
Consider a relation R(StudentID, CourseID, InstructorID, StudentName, CourseName, InstructorName) with the following functional dependencies: 1. StudentID → StudentName 2. CourseID → CourseName 3. InstructorID → InstructorName 4. StudentID, CourseID → InstructorID After normalization, following tables created. • Students Table: (StudentID, StudentName) • Courses table: (CourseID, CourseName) • Instructors Table: (InstructorID, InstructorName) • Enrollment Table: (StudentID, CourseID, InstructorID) Identify the level of normalization after the decomposition.
Answer
C. 3NF
55
Choose the correct statements regarding the use of NULL values in aggregate functions ?
Answer
B. The COUNT(*) function will count all rows, including those with NULL values, and the AVG () function will exclude NULL values in its calculation.
56
Based on the given relational schemas, choose the correct nested sub queries which will correctly return the names of employees who work in the 'sales' department ? • Employees (EmpID, EmpName, Salary, DepartmentID) • Departments (DepartmentID, DepartmentName)
Answer
A. SELECT EmpName FROM Employees WHERE DepartmentID = (SELECT DepartmentID FROM Departments WHERE DepartmentName = 'Sales');
57
Choose the false statements about DBMS views
Answer
C. Views involving complex queries, aggregates, or joins are directly updatable.
58
Select the statement which return the result of the following SQL query SELECT E.EmpName, D. DepartmentName FROM Employees E JOIN Departments D ON E.DepartmentID = D.DepartmentID WHERE D.Location = 'New York' ;
Answer
D. The query returns the names of employees and the names of their departments only for employees who work in departments located in 'New York'.
59
Analyse the following statements and identify the violation of ACID properties i) A system crash occurs after a transaction is committed and the database does not reflect the changes made by the transaction ii) Two transactions concurrently updating the same data cause the database to end up in an invalid state. iii) A transaction fails to complete due to an error and all changes made by the transaction are rolled back. iv) A tranasction transfers funds from one account to another, and both accounts reflect the updated balances once the transaction is completed.
Answer
B. i & ii
60
Based on the given scenario, identify the problem occurred. Scenario : Suppose two transactions, T1 and T2, read the balance of a bank account. T1 reads the balance as $2000 and plans to add $200, while T2 reads the same balance and plans to subtract $300. Both transactions read the balance before any updates are made. If T1 updates the balance to $2200 and then T2 updates it to $1700, the final balance will incorrectly reflect T2's update only.
Answer
A. Lost Update Problem
61
Identify the trigger type suitable for the following scenario: Scenario : Table orders has columns orderID, OrderDate, CustomerID, and OrderTotal, Additionally, there is a table Customers with columns CustomerID, CustomerName, and TotalSpent. Every time an order is inserted into the Orders table, the TotalSpent column in the Customers table should be updated to reflect the total amount spent by the Customer across all orders.
Answer
B. AFTER INSERT
62
What are the Advantages of Using Stored Procedures ?
Answer
D. All of the above
63
Which type of client server architecture enables increased security and increases scalability of clients ?
Answer
B. Three tier client server architecture
64
In the following code, which is the missing character in the code ?
My First Heading
My first paragraph.
This is another paragraph.
Answer
C. /
65
What is the result of the following HTML Code ?
| 100 | 200 | |
| 400 | 500 | 600 |
Answer
A. 100 200 400 500 600
66
What is the type of selector used in this example ?
Red and center-aligned heading
Answer
B. Class selector
67
What is the Style property to be set to make the text appear in the middle of the box ?
Flower
Answer
A. text-align : center;
68
What will the following javascript code do ?
JavaScript can hide HTML elements.
Answer
B. JavaScript can hide HTML elements
69
What is the use of myfunction in the following java script ?
Click the button.
Answer
A. Function will replace the document with new content
70
What is the output of the following Code ?
Answer
A. 53
71
What is the output of the following code snippet ?
Answer
B. -101234
72
What is the attribute value used in this XML, file given below ? Everyday Italian Giada De Laurentiis 2005 30.00
Answer
C. cooking
73
What is a cookie ?
Answer
B. Created to identify a user
74
Choose the correct option that describes this code the best.
Answer
B. When the Hi button is clicked it changes to Hello
75
The port numbers used by HTTP and HTTPs are _______ and ____________
Answer
B. 80, 443
76
In slotted ALOHA, the vulnerable time is
Answer
A. 1* frame transmission time
77
The policy that is not adopted by open loop congestion control is
Answer
C. Backpressure
78
How many usable host IP addresses are there in a class B network with network mask of 255.255.0.0?
Answer
D. 2¹⁶−2
79
A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is 011111001101, then the input bit-string is
Answer
A. 01111101101
80
Find the frequency of a signal if the period of the signal is 200ms
Answer
B. 0.5*
81
In DNS, the ____________ domain is used to map an address to a name.
Answer
B. Inverse
82
__________ and ____________ are protocols used for pulling messages from a mail server.
Answer
D. POP3, IMAP4
83
SOAP is a light weight protocol based on
Answer
C. XML
84
In RMI, ____________ acts a gateway for the client side object.
Answer
C. Stub
85
DES uses a key generator to generate sixteen ____________ bit round keys.
Answer
A. 48
86
In an RSA cryptosystem, the numbers 3 and 11 are used to generate public and private keys. If the public and the private keys are 3 and 7, what is cipher test obtained when 6 is encrypted using public key ?
Answer
A. 18
87
Which of the following is not a higher-layer protocol defined as part of SSL ?
Answer
D. SSL connection protocol
88
A system call that is used to send TCP SYN packets is ________
Answer
D. Connect
89
Assume that the size of an organic type software product has been estimated to be 32,000 lines of source code. Constants a₁, a₂, b₁, b₂ have values 2.4, 1.05, 2.5, 0.38 respectively for an organic software. The effort required to develop the software product, using COCOMO model is
Answer
A. 2.4×(32)¹·⁰⁵
90
Which software development model has no provision to go back to modify artifacts produced during an earlier phase ?
Answer
A. Classical waterfall model
91
The UML figure given below shows the example of a
Answer
D. Sequence Diagram
92
Which among the following statements are correct with respect to Use Case Diagrams i. Describes how a user interacts with the system by defining the steps required to accomplish a specific goal. ii. It provides a big picture of the functionality of the system. iii. Shows the structural relations among entities. iv. Shows the temporal order of the message passing among objects.
Answer
B. Only (i & ii)
93
In general which among the following phases consumes the maximum efforts in a software development life cycle
Answer
D. Testing
94
If you do want to indicate how the actions are divided among the participants, you can decorate an Activity Diagram with i. Fork Node ii. Join Node iii. Swimlanes
Answer
C. Only (iii)
95
Cyclomatic Complexity has a foundation in graph theory and provides you with a useful software metric in
Answer
D. Path testing
96
Which among the following does not come under non-functional requirements ? i. Design and implementation constraints ii. Maximum number of concurrent users. iii. External interfaces
Answer
D. None of the above
97
If it would be possible to identify the specific design component which implements a given requirement, and test cases that test a given requirement, we call it as
Answer
B. Traceable
98
Which among the following attributes are considered as highly desirable for a good SRS Document ?
Answer
C. Implementation-independent
99
In transform analysis, the Data Flow Diagram is to divided into following types of parts. i. Input ii. Branching iii. Processing iv. Output
Answer
D. Only (i, iii & iv)
100
Beta testing refers to i. The system testing performed by the customer to determine whether to accept the delivery of the system. ii. The system testing carried out by the test team within the developing organisation. iii. The system testing performed by a select group of friendly customers.
Answer
C. Only (iii)
Discussion
Ask a doubt or share a tip.
No comments yet — start the discussion.