Page:14
Below are the scanned copy of Kerala Public Service Commission (KPSC) Question Paper with answer keys of Exam Name 'LECTURER IN COMPUTER SCIENCE COLLEGIATE EDUCATION' And exam conducted in the year 2018. And Question paper code was '073/2018'. Medium of question paper was in Malayalam or English . Booklet Alphacode was 'A'. Answer keys are given at the bottom, but we suggest you to try answering the questions yourself and compare the key along wih to check your performance. Because we would like you to do and practice by yourself.
92. Consider the following relational schemas :
Suppliers (sid:integer, sname:string, city:string, street:string)
Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)
Consider the following relational query on the above database :
SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C.sid FROM Catalog ಲಿ
WHERE C.pid NOT IN(SELECT P.pid FROM Parts P WHERE P.color <> ‘blue’)).
Assume that relations corresponding to the above schema are not empty. Which one of the
following is the correct interpretation of the above query ?
(ಹಿ) Find the names of all suppliers who have supplied a non-blue part.
(B) Find the names of all suppliers who have not supplied a non-blue part.
(C) Find the names of all suppliers who have supplied only blue parts
(D) Find the names of all suppliers who have not supplied only blue parts.
93. What is the output of this program ?
#include
using namespace std;
int main()
(
11 ೫1[] 7 14, 5, 6,7];
int *p = (arr + 1);
cout <<*p;
return 0;
}
^) 4 (8) 5
© 6 D) 7
94. What is the result of the following piece of code:
public class Person {
public void talk(){
System.out.print(“T am a Person”);
}
public class Student extends Person {
public void talk(){
System.out.print(“I am a Student™);
}
public class Test {
public static void main(String args[]){
Person p =new Student();
p-talk();
}
}
(^) Iama Person (8) Tam astudent
(C) Tama Person I ama Student (D) Tama Student I am a Person
073/2018 14