Computer
Computer
a) SELECT e.empid, e.empname FROM employee e JOIN loan ln on e.empid = ln.empidln.empid WHERE
loanid is NULL
b) SELECT e.empid, e.empname FROM employee e LEFT OUTER JOIN loan ln on e.empid = ln.empid
WHERE loanid is NULL
c) SELECT e.empid, e.empname FROM employee e RIGHT OUTER JOIN loan ln on e.empid = ln.empid
WHERE loanid is NULL
d) SELECT e.empid, e.empname FROM employee e FULL OUTER JOIN loan ln on e.empid = ln.empid
WHERE loanid is NULL
Q.63) In relational database model cardinality of relation means:
a) The number of constraints
b) The number of tuples
c) The number of attributes
d) The number of tables
Q.64) Which of the following set of dependencies is suitable for making a relation R(ABCD) to be in 3NF but not
in BCNF.
a) {AB->CD,C->DA}
b) {AB->CD,C->A,D->B}
c) {A->BCD,B->CD,C->D}
d) {CB->CD,A->C,D->B}
]
Q.65) Find the correct match:
int main()
{
X x;
Y y;
X& rx = y;
rx.foo();
rx.go();
return 0;
}
a) X::f Y::g
b) X::f
c) Y::g
d) Compiler Error
Q.71)
#include <iostream>
using std::cout;
int main()
{
int i = 0;
cout << (i = 0 ? 1 : 2 ? 3 : 4);
return 0;
}
a) 1
b) 2
c) 3
d) 4
Q.72) What is the output of the following program?
#include <iostream>
using std::cout;
int main()
{
int i = 0, j = 0;
++++j = ++++i + i++;
cout << i;
cout << j;
return 0;
}
a) 12
b) 34
c) 22
d) compile dependent
Q.73)
#include <iostream>
using namespace std;
void f2(int p = 30)
{
for (int i = 20; i <= p; i += 5)
cout << i << " ";
}
void f1(int& m)
{
m += 10;
f2(m);
}
int main()
{
int n = 20;
f1(n);
cout << n << " ";
return 0;
}
Option
a) 25 30 35 20
b) 20 25 30 20
c) 25 30 25 30
d) 20 25 30 30
Q.74)
#include <iostream>
using namespace std;
void fun(char s[], int n)
{
for (int i = 0; s[i] != '\0'; i++)
if (i % 2 == 0)
s[i] = s[i] - n;
else
s[i] = s[i] + n;
}
int main()
{
char str[] = "Hello_World";
fun(str, 2);
cout << str << endl;
return 0;
}
Option
a) EgjnmaTqpnb
b) FgjnmaUqpnb
c) Fgjnm_Uqpnb
d) EgjnmaTqpnb
Q.75)
#include <iostream>
using namespace std;
int main()
{
char* str = "GEEKSFORGEEK";
int* p, arr[] = { 10, 15, 70, 19 };
p = arr;
str++;
p++;
cout << *p << " " << str << endl;
return 0;
}
Option
a) 10 EEKSFORGEEK
b) 15 GEEKSFORGEEK
c) 15 EEKSFORGEEK
d) 10 GEEKSFORGEEK
Q.76)
#include <iostream>
using namespace std;
int main()
{
int x[] = { 12, 25, 30, 55, 110 };
int* p = x;
while (*p < 110) {
if (*p % 3 != 0)
*p = *p + 1;
else
*p = *p + 2;
p++;
}
for (int i = 4; i >= 1; i--) {
cout << x[i] << " ";
}
return 0;
}
Option
a) 110 56 32 26
b) 110 57 30 27
c) 110 56 32 25
d) 100 55 30 25
Q.77) Is it fine to call delete twice for a pointer?
#include<iostream>
using namespace std;
int main()
{
int *ptr = new int;
delete ptr;
delete ptr;
return 0;
}
a) Yes
b) No
c) Compiler Error
d) Yes 0
Q.78) Which function is used to position back from the end of file object?
a) seekg
b) seekp
c) both seekg & seekp
d) none of the mentioned
Q.79)
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ofstream ofile;
ofile.open ("text.txt");
ofile << "All the Best" << endl;
cout << "Data written to file" << endl;
ofile.close();
return 0;
}
a) All the Best
b) Compiler Error
c) Best of Luck
d) None
Q.80)
nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']
print nameList[1][-1]
a) P
b) i
c) k
d) none
Q.81)
def addToList(listcontainer):
listcontainer += [10]
mylistContainer = [10, 20, 30, 40]
addToList(mylistContainer)
print len(mylistContainer)
a) 2
b) 5
c) 6
d) 7
Q.82) What is the output of the following program?
dictionary1 = {'Google' : 1,
'Facebook' : 2,
'Microsoft' : 3
}
dictionary2 = {'GFG' : 1,
'Microsoft' : 2,
'Youtube' : 3
}
dictionary1.update(dictionary2);
for key, values in dictionary1.items():
print(key, values)
a) Compilation error
b) Runtime error
c) (‘Google’, 1)
(‘Facebook’, 2)
(‘Youtube’, 3)
(‘Microsoft’, 2)
(‘GFG’, 1)
d) None of these
Q.83)
<?php
$GfG = "GoodforGood";
echo ltrim(strstr($GfG, "f"),"f");
?>
Options:
a) GoodforGood
b) Good
c) Goodf
d) orGood
Q.84)
<?php
$username = "sagarshUkla785";
if (ereg("([^a-z])",$username))
echo "Not a valid username!";
else
echo "Valid username!";
?>
a) Error
b) Not a valid username!
c) Valid username!
d) No Output is returned
Q.85)
<?php
$languages = array("C++", "JAVA", "PYTHON", "SCALA");
$language = preg_grep("/^S/", $languages);
print_r($language);
?>
a) Array ( [0] => C++ [1] => JAVA [2] => PYTHON [3] => SCALA )
b) Array ( [3] => SCALA )
c) Array ( [1] => JAVA )
d) Array ( [0] => C++ )
Q.86) Any node is the path from the root to the node is called
a) Successor node
b) Ancestor node
c) Internal node
d) None of the above
Q.87) ………… is very useful in situation when data have to stored and then retrieved in reverse order.
a) Stack
b) Queue
c) List
d) Link list
Q.88) The property of binary tree is
a) The first subset is called left subtree
b) The second subtree is called right subtree
c) The root cannot contain NULL
d) The right subtree can be empty
Q.89) Quick sort is also known as
a) merge sort
b) heap sort
c) both
d) none of these
Q.90) Which if the following is/are the levels of implementation of data structure
a) Abstract level
b) Application level
c) Implementation level
d) All of the above
Q.91) ………………. is not an operation performed on linear list
a) Insertion
b) Insertion & Deletion
c) Deletion & Traversal
d) None of the above
Q.92) Which is/are the application(s) of stack
a) Function calls
b) Large number Arithmetic
c) Evaluation of arithmetic expressions
d) All of the above
Q.93) In Breadth First Search of Graph, which of the following data structure is used?
a) Stack
b) Queue
c) Linked List
d) None of the above
Q.94) The best average behaviour is shown by
a) Quick Sort
b) Merge Sort
c) Insertion Sort
d) Heap Sort
Q.95) What is the postfix form of the following prefix *+ab–cd
a) ab+cd–*
b) abc+*–
c) ab+*cd–
d) ab+*cd–
Q.96) When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal would return
a) FAEKCDBHG
b) FAEKCDHGB
c) EAFKHDCBG
d) FEAKDCHBG
Q.97) ……………. overloaded through a member function take one explicit argument and those which are
overloaded through a friend function take two explicit arguments.
a) Unary operators
b) Binary operators
c) Arithmetic operators
d) Function operator
Q.98) The conversion from a class to any other type or any other class should make use of a ………….. in the
source class.
a) casting operator
b) constructor
c) not applicable
d) operator function
Q.99) What will be the order of execution of base class constructors in the following method of inheritance.
class A: public B, public C {….};
a) B(); C(); A();
b) C(); B(); A();
c) A(); B(); C();
d) B(); A(); C();
Q.100) In ……………….. inheritance, the base classes are constructed in the order in which they appear in the
deceleration of the derived class.
a) Hybrid
b) multiple
c) multilevel
d) hierarchical
Q.101) This technique for data transfer does not involve the processor
a) DMA
b) programmed I/O
c) memory mapped I/O
d) all the above
Q.102) Which type of display device used in calculators
a) nixie tube
b) 7 segment LED/LCD
c) 8 digit display
d) 10 digit display
Q.103) The number of flip flops needed for a counters to count 0 to 32 is
a) 4
b) 5
c) 32
d) 6
Q.104) Reduced form of the Boolean expression (A+B)(A+C) is
a) AB+AC
b) A+B+C
c) AC+B
d) A+BC
Q.105) The Boolean expression for the output of the logic circuit shown below is
a) AB+ ̅ +
b) AB+ ̅ + ̅
c) A + ̅ +
d) AB+ ̅ + ̅
Q.106) The 2’s complement of binary number 010111 is
a) 101001
b) 101000
c) 010111
d) 101011
Q.107) The m bit parallel adder consists of
a) (m+1) full adder
b) m/2 full adder
c) (m-1) full adder
d) m full adder
Q.108) The number of switching functions of 4 variables is
a) 8
b)16
c) 4
d) 64
Q.109) The characteristic equation of the T flip flop is
a) = +
b) = +
c) =
d) =
Q.110) The logical expression Y=A+ ̅ is equivalent to
a) AB
b) A
c) ̅ +
d) A+B
Q.111) How many address lines required to design 1024x8 bit RAM
a) 1024
b) 8
c) 11
d) 10
Q.112) The number of MOS transistors required to implement a typical dynamic RAM cell is
a) 6
b) 5
c) 1
d) 2
Q.113) Four memory chips of 16x4 size have their address bus connected together. The system will be of size
a) 64x64
b) 16x16
c) 32x8
d) 256x4
Q.114) The basic memory cell of a dynamic RAM consists of
a) a capacitor
b) transistor
c) flipflop
d) a transistor acting as a capacitor
Q.115) The capacity of 2Kx16 PROM is to be expanded to 16Kx16. find the number of PROM chips required and
the number of address lines in the expanded memory
a) 16 chips,16 address
b) 4 chips,16 address
c) 8 chips,14 address
d) 8 chips,16 address
Q.116) The correct instruction execution sequence is
a) fetch, decode, execute
b) decode, execute, fetch
c) execute, fetch, decode
d) fetch, execute, decode
Q.117) Program counter holds
a) address of next instruction to be executed
b) instructions to be executed
c) data
d) none
Q.118) What converts data from electrical to other form of energy in an I/O module
a) converter
b) transformer
c) transducer
d) arbiter
Q.119) This layer of the firewire bus controls the data transmission priority and fairness protocols
a) Link layer
b) Isochronous layer
c) Transaction layer
d) none
Q.120) A processor is fetching instructions at the rate of 1 MIPS. A DMA module is used to transfer characters to
RAM from a device transmitting at 9600bps. How much time will the processor be slowed down due to DMA
activity.
a) 1.2ms
b) 2.4ms
c) 2.2ms
d) 4.2ms
OS Unit -2
Q.121) Which combination of the following features will suffice to characterize an OS as a multi-programmed OS?
a. More than one program may be loaded into main memory at the same time for execution.
b. If a program waits for certain events such as I/O, another program is immediately scheduled for execution.
c. If the execution of program terminates, another program is immediately scheduled for execution.
a) a
b) a and b
c) a and c
d) a, b and c
Q.122) The process state transition diagram of an operating system is as given below.
Which of the following must be FALSE about the above operating system?
Process P2:
t=0: requests 2 units of R3
t=2: requests 1 unit of R4
t=4: requests 1 unit of R1
t=6: releases 1 unit of R3
t=8: Finishes
Process P3:
t=0: requests 1 unit of R4
t=2: requests 2 units of R1
t=5: releases 2 units of R1
t=7: requests 1 unit of R2
t=8: requests 1 unit of R3
t=9: Finishes
Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?
a) All processes will finish without any deadlock
b) Only P1 and P2 will be in deadlock.
c) Only P1 and P3 will be in a deadlock.
d) All three processes will be in deadlock
Q.126) The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-
and-set instruction as follows:
void enter_CS(X)
{
while test-and-set(X) ;
}
void leave_CS(X)
{
X = 0;
}
In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the
following statements:
I. The above solution to CS problem is deadlock-free
II. The solution is starvation free.
III. The processes enter CS in FIFO order.
IV. More than one process can enter CS at the same time.
Which of the above statements is TRUE?
a) I only
b) I and II
c) II and III
d) IV only
Q.127) A multilevel page table is preferred in comparison to a single level page table for translating virtual address
to physical address because
a) It reduces the memory access time to read or write a memory location.
b) It helps to reduce the size of page table needed to implement the virtual address space of a process.
d) It is required by the translation lookaside buffer.
d) It helps to reduce the number of page faults in page replacement algorithms.
Q.128) The P and V operations on counting semaphores, where s is a counting semaphore, are defined as follows:
P(s) : s = s - 1;
if (s < 0) then wait;
V(s) : s = s + 1;
if (s <= 0) then wakeup a process waiting on s;
Assume that Pb and Vb the wait and signal operations on binary semaphores are provided. Two binary semaphores
Xb and Yb are used to implement the semaphore operations P(s) and V(s) as follows:
P(s) : Pb(Xb);
s = s - 1;
if (s < 0) {
Vb(Xb) ;
Pb(Yb) ;
}
else Vb(Xb);
V(s) : Pb(Xb) ;
s = s + 1;
if (s <= 0) Vb(Yb) ;
Vb(Xb) ;
The initial values of Xb and Yb are respectively
a) 0 and 0
b) 0 and 1
c) 1 and 0
d) 1 and 1
Q.129) Group 1 contains some CPU scheduling algorithms and Group 2 contains some applications. Match entries
in Group 1 to entries in Group 2.
Group I Group II
P. Gang Scheduling (1) Guaranteed Scheduling
Q. Rate Monotonic Scheduling (2) Real-time Scheduling
R. Fair Share Scheduling (3) Thread Scheduling
a) P – 3 Q – 2 R – 1
b) P – 1 Q – 2 R – 3
c) P – 2 Q – 3 R – 1
d) P – 1 Q – 3 R – 2
Q.130) Processes P1 and P2 use critical_flag in the following routine to achieve mutual exclusion. Assume that
critical_flag is initialized to FALSE in the main program.
get_exclusive_access ( )
{
if (critical _flag == FALSE) {
critical_flag = TRUE ;
critical_region () ;
critical_flag = FALSE;
}
}
Consider the following statements.
i. It is possible for both P1 and P2 to access critical_region concurrently.
ii. This may lead to a deadlock.
Which of the following holds?
a) (i) is false and (ii) is true
b) Both (i) and (ii) are false
c) (i) is true and (ii) is false
d) Both (i) and (ii) are true
Q.131) Where was National institute of visually handicapped located?
a) Kolkata
b) Dehradun
c) Mumbai
d) Hyderabad
Q.132) Who among the following is associated with logical atomism?
a) John Deway
b) Russell
c) Carl jung
d) Thorndike
Q.133) Which among the following psychologist gave language communication model?
a) Chomsky
b) Vygoisky
c) Roger and Thoemaker
d) Falingar
Q.134) Which among the following psychologist is known as father of experimental learning?
a) Wilhelm Wundt
b) Freud
c) Tharndike
d) Parton
Q.135) MOOC stands for
a) Massive online open course
b) Massive open online course
c) Masachu chats online open course
d) Mass open online course
Q.136) Which of the following is not a role of NCTE?
a) Coordinate and monitor teacher education
b) Promote and conduct innovative research in teacher education
c) To prevent commercialization of teacher education
d) Giving recognition to schools
Q.137) Match the following
A. Mathegenics - i Robert mager
B. CAI - ii Norbert weiner
C. LCJ - iii Roth kopt
D. Cybernatics - iv Robert stolurow
a) III IV I II
b) I II III IV
c) III IV II I
d) III IV II I
Q.138) Which among the following psychologist associated with competency motivation?
a) Maslow
b) Macdougal
c) Robert White
d) Atkinson
Q.139) Which artide says about “No Religion instruction shall be provided in any educational institution wholey
maintained by state fuids”?
a) 28 (1)
b) 28 (2)
c) 29
d)30
Q.140) In which of the following piage’s stage object permance comes?
a) Sensory motor stage
b) Preoperational stage
c) Concrete operational stage
d) Formal operational stage
Q.141) The comptroller and auditor general of India is
a) Venkatesh Mohan
b) Antia Pattanayak
c) Vinod Rai
d) Rajiv Mehrishi
Q.142) On which day Jawaherlal Nehru hoisted the tricolor of Indian Independence on the banks of the
River Ravi at Lahore?
a) 1 January 1930
b) 26 January 1931
c) 15 August 1947
d) 26 January 1950
Q.143) How many recognized political parties were in India during 1952 elections?
a) 4
b) 12
c) 14
d) 16
Q.144) Who is the chairman of NITI Aayog?
a) V.K. Saraswat
b) Narendra Modi
c) Arvind Panagariya
d) Bibek Debroy
Q.145) The International Day of Peace Day is observed around the world each year on ---------?
a) September 20
b) September 23
c) September 21
d) September 22
Q.146) Which Delhi Sultan is called as ‘A slave of a slave’?
a) Balban
b) Kuth-ud-din Aibak
c) Raziya
d) Iltumish
Q.147) The Second Edition of the Tamilnadu Global investors meet (GIM) held on
a) 23rd and 24th January 2018
b) 23rd and 24th January 2017
c) 23rd and 24th January 2015
d) 23rd and 24th January 2019
Q.148) India’s first Microprocessor was designed by Whom ------
a) IITM - Indian Institute of Technology madras
b) IITD - Indian Institute of Technology Delhi
c) IITK - Indian Institute of Technology Korakpur
d) IITC - Indian Institute of Technology Calcutta
Q.149) Match the following:
a. Individual Satyagraha 1.1942
b. Quit India Resolution 2.1940
c. Cabinet Mission 3.1947
d. Mountbatten Plan 4.1946
a) 1 2 3 4
b) 3 4 2 1
c) 2 1 4 3
d) 4 3 1 2
Q.150) BSLVC 44 lifted off with microsat – Rand Kalam saton
a) 24th January 2018
b) 24th January 2019
c) 24th January 2017
d) 24th January 2019