0% found this document useful (0 votes)
30 views24 pages

Paper-4 (1) Compressed

The document is a test booklet for a programming examination, containing instructions for candidates on how to fill out their response sheets and the penalties for incorrect answers. It includes various programming and database-related questions, covering topics like C code output, database schemas, and sorting algorithms. Candidates are instructed to check their booklets for completeness and to follow specific guidelines during the examination.

Uploaded by

Sumit Sinha
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)
30 views24 pages

Paper-4 (1) Compressed

The document is a test booklet for a programming examination, containing instructions for candidates on how to fill out their response sheets and the penalties for incorrect answers. It includes various programming and database-related questions, covering topics like C code output, database schemas, and sorting algorithms. Candidates are instructed to check their booklets for completeness and to follow specific guidelines during the examination.

Uploaded by

Sumit Sinha
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/ 24

DO NOT OPEN THIS TEST BOOKLET UNTIL YOU ARE TOLD TO DO SO

Booklet Serial No. 0 0 31 7 7


TEST BOOKLET -2022

PROGRAMMER A

19)
Time Allowed: Two Hours Maximum Marks: 100

INSTRUCTIONS
IMMEDIATELY AFTER THE COMMENCEMENT OF THE EXAMINATION, YOU SHOULD
CHECK THAT THIS TEST BOOKLET DOES NOT HAVE ANY UNPRINTED OR TORN OR
MISSING PAGES OR ITEMS ETC. IF SO, GET IT REPLACED BY A COMPLETE TEST
BOOKLET.
Please note that it is the candidate’s responsibility to encode and fill in the Roll Number
and Test Booklet Series CodeA, B, C or D carefully and without any omission or discrepancy
at the appropriate places in the OMR Response Sheet. Any omission/discrepany will render
the Response Sheet liable for rejection.
You have to enter-your Roll Number on the Test Booklet
in the Box provided alongside. DO NOT write anything
else on the Test Booklet.
This Test booklet contains 100 items (questions). Each item comprises of four responses
(answers). You will select the response which you want to mark on the Response sheet. In case
you feel that there is more than one correct response, mark the response which you consider the
best. In any case, choose ONLY ONE response for each item.
‘You have to mark all your responses ONLY on the separate Response Sheet provided. See
directions in the Response Sheet.
All items carry equal marks.
Before you proceed to mark in the Response sheet the response to various items in the Test
Booklet you have to fill in some particulars in the Response Sheet as per instructions sent to you
with your Admission Certificate.
After you have completed filling in all your responses on the Response Sheet and the examination
has concluded, you should hand over to the Invigilator only the Response Sheet. You are
permitted to take away with you the Test Booklet and Candidate’s Copy of the Response Sheet.
Sheets for rough work are appended in the Test Booklet at the end.
10. Penalty for wrong answers:
THERE WILL BE PENALTY FOR WRONG ANSWERS MARKED BY THE CANDIDATE.
(i) There are four alternatives for the answer to every question. For each question for which a
wrong answer has been given by the candidate, 0.25 of the marks assigned to that question
will be deducted as penalty.
(@ii) TIta candidate gives more than one answer, it will be treated as a wrong answer even if one
- of the given answers happens to be correct and there will be same penalty as above for that
question.
(iii) faquestion is left blank, i.e., no answer is given by the candidate, there will be no penalty for
that question.

DO NOT OPEN THIS TEST BOOKLET RE TOLD TO DO SO

19(A)/2022 [P.T.O.
Given the statement,
Maruti.engine.bolts 25 ;
‘Which of the following is true?
A) Structure bolts are nested within a structure engine
B) Structure engine is nested within structure bolts
C) Structure Maruti is nested within the structure engine
D) Structure Maruti is nested within structure bolts.

An expression contains relational, assignment, and arithmetic operators. In the absence


of parentheses, the order of evaluation will be:
A) Assignment, relational, arithmetic
B) Arithmetic, relational, assignment
C) Relational, arithmetic, assignment
D) Assignment, arithmetic, relational

The ‘break’ statement is used to exit from:


A) Anifstatement
B) A forloop
C) Aprogram
D) The main() function

In afile containing the line “I am a boy\r\n” then on reading this line into the array str
using fgets(). What will str contain?
A) “lamaboy\r\n\0”
B) “Iamaboy\\0”
C) “Iamaboy\n\0”
D) “Iamaboy”

main
() {
inti=4,j=2;
Jjunk (&1, j);
printf(“\n%d %d”, 1,j);
}
Jjunk (int *i, intj ) { *i=***i;j*j;}
A 162
B) 164
C) 44
D) 42

19(A) (€)) [P.T.O.


6. intmain()
{
inti;
intal 1={2,4,6, 8, 10};
change (a, 5);
for (i=0; i<=4; i++)
printf ("%d, ", a[i]);
return 0;
}
void change(int *b, intn)
{
inti;
for (i=0;i<n;i++)
*(bt1) = *(b+i)+5;
}
A) 7,9,11,18,15
B) 2,15,6,8,10
C) 246810
D) 3,1,-1,-3,-5

7. What will be the output of the following C code?


#include <stdio.h> :
union stu
{
intival;
float fval;
b
void main()

{ :
union stur;
rival=5;
printf("%d", r.ival);

A 9
B) Compile time error
C) 16
D) 5

19(A) - @ -
What will be the output of the following C code?
#include <stdio.h>
int main( )
{
inti=97,=*p=&i;
foo(&i);
printf(*%d", *p);
3
void foo(int *p)
{
intj=2;
p=&j;
printf{("%d", *p);
}
A 297
B) 22
C) Compile time error
D) Segmentation fault/code crash

Which function will you choose to join two words?


A) Strepy()
B) Streat()
C) Strcon()
D) Memcon()

10. What will be the output of the following C code?


#include <stdio.h>
void main()
{
ntx=>5;
if(x<1)
printf("hello");
if (x=5)
printf{("hi");
else
printf("no");
}
A) hi
B) hello
C) no
D) error

19(A) ®) [P.T.O.
11. What will be the output of the following C code?
#include <stdio.h>
void main ()
{
intx=0;
if (x==0)
printf("hi");
else’
printf("how are u");
printf("hello");
}
A) hi
B) howareyou
C) hello
D) hihello

12. Inathree-tier architecture, the intermediate layer between database and client server is
classified as
A) Functional sever
B) Transcation server
C) Application server
D) Diskserver

13. Which of the following is a single-valued attribute?


A) Register number
B) Address
C) SUBJECT-TAKEN
D) Reference

14. In which of the following is a single entity instance of one type related to many entity
instances of another type?
A) One-to-One Relationship
B) One-to-Many Relationship
C) Many-to-Many Relationship
D) Composite Relationship

19(A) ) (6)
15. What is a snapshot of the data in the database at a given instant time called?
A) Database instance
B) Database scheme
€) Database snap
D) Snap ofdatabase

16. Inrelational Database schemas, the transition constraints are also known as
A) Static Constraints
B) Dynamic Constraints
C) Implicit Constraints
D) Explicit constraints

17. Which of the following is not a restriction for a table to be a relation?


A) The cells of the table must contain a single value
B) All ofthe entries in any column must be of the same kind
C) The columns must be ordered :
D) Notworowsin atable may be identical

18. Which of the following is not a type of Normal Form?


A) INF
B) 2NF
C) 3NF
D) 10NF

19. The ability to query data, as well as insert, delete, and alter tuples, is offeredby
A) TCL (Transaction Control Language)
B) DCL (Data Control Language)
C) DDL (DataDefinition Language)
D) DML (DataManipulation Language)

20. Dataintegrity means:


A) Providing first access to stored data
B) Ensuring correctness and consistency of data
C) Providing data sharing
D) Noneofthe above

19(A) @) [P.T.O.
21. Examine the structure of the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEES
EMPLOYEE ID NUMBER DEPARTMENT_ID NUMBER MANAGERID NUMBER
LAST NAME VARCHAR2(25)
DEPARTMENTS
DEPARTMENT. IDNUMBER MANAGER_ID NUMBER DEPARTMENT NAME
VARCHAR2(35)
LOCATION_IDNUMBER
You want to create a report displaying employee last names, department names, and
locations. Which query should you use to create an equi-join?
A) SELECT last_name, department name, location_id FROM employees,
departments;
B) SELECT employees. last_name, departments.departme nt departments.
name,
location_id FROM employees e, departments D WHERE e.department_
id=d.department
id;
C) SELECT e.last name, d.department_name, d.location_id FROM employees e,
departments D WHERE manager_id =manager_id;
D) SELECT e.last name, d.department name, d.location_id FROM employees e,
departments D WHERE e.department_id=d.department_id;

22. When we update any tuple in the relation which Authorization on a relation allows a user
t0?
A) Select authorization
B) Update authorization
C) Grantauthorization
D) Define authorization

23. Which of the following scheduling algorithms could result in starvation?


A) Priority B) RoundRobin
C) FCFS D) Shortest job first

24. On asystem with 22* bytes of memory and fixed partitions, all of size 65,536 bytes what
is the minimum number of bits needed in an entry in the process table to record the
partition to which a process has been allocated?
A) 216 B) 2°
o 2 D) 2%

25. A sequential access file has fixed size 15-byte records. Assuming the first record is
record 1, the first byte of record 5 will be at what logical location?
A) 65 B) 69
C) 67 D) 61

19(A) ®
26. Onasystem using a disk cache, the mean access time is dependent on the mean cache
access time, the mean disk access time, and the hit rate. For flqe following, what is the
mean access time?
a) Cache:1 ms; disk:100 ms; hit rate:25%
b) Cache:1 ms; disk:100 ms; hit rate:50%
A) a=75.25,b=50.50
B) a=70.25,b=55.50.
C) a=75.25,b=55.50
D) a=70.25, b=50.50"

27. ___ areusedtokeep track of both real and virtual memory.


A) VO tables
B) Memory tables
C) File tables
D) Process tables

28. The Circular Wait Condition Can Be Prevented By


A) Defining a linear ordering of resource types
B) Using thread
0 Using pipes
D) All of the mentioned

29. Why is it not possible to enforce memory protection at compile time?


A) Without proper permission, the program in one process cannot be able to reference
memory location for reading or writing of another process.
B) Relocation of a process increases the complexity of satisfying the protection
requirement.
©} Predicting the location of a program in the main memory is very difficult, it is not
possible to check the absolute address at compile time to give proper protection.
D) All the above

30. Whatis the difference between a page and a frame?


A) A page is a part of a process, while a frame is a part of memory.
B) A page is a part of a memory, while a frame is-a part of a process.
O BothAand B
D) None of the above

19(A) ©) [P.T.O.
31. Consider the following four processes with the arrival time and length of CPU burst
given in milliseconds:
Process Arrival Time Burst Time
Pl 0 8
P2 1 4
P3 2 L)
P4 3 5
The average waiting time for preemptive SIF scheduling algorithm is
A) 6.5ms ;
B) 7.5ms
C) 6.75ms
D) 9.0ms

32. The types of file systems in the Solaris example is


A) Tmpfs
B) Objfs
C) Citfs
D) Allthe above

33. The wait-for graph is a deadlock detection algorithm that is applicable when
A) Allresources have a single instance
B) Allresources have multiple instances’
C) Allresources have a single 7 multiple instances
D) All of the mentioned

34. Consider the following arithmetic infix expression Q


Q:A+B*C—(DETE)*G*H
A) ABC*DEF1/G*-H*+
B) /G*-H*+ABC*DEFT
C) ABCT/G*H*+*DEF
D) DEFV/G*-H*+ABC*

35, ‘We want to evaluate the following parenthesis free arithmetic expression:
213+5%212-12/6
A 20
B) 26
o 19
D) 32

19(A) - 10)
36. The maximum number of nodes in a binary tree of height h is
A) 2n+1 -1

B) 2t
c) 2h+2 -1

D) ZM—I

37. Whatis an external sorting algorithm?


A) The algorithm that uses tape or disk during the sort
B) The algorithm that uses main memory during the sort
C) Thealgorithm that involves swapping
D) The algorithm that is considered ‘in place’

38. What is the worst-case complexity of bubble sort?


A) O(nlogn)
B) O(logn)
C) O(m)
D) O@2)

39. Suppose we have an O(n) time algorithm that finds the median of an unsorted array. Now
consider a QuickSort implementation where we first find the median using the above
algorithm, then use the median as a pivot. What will be the worst-case time complexity
of this modified QuickSort?
A) O@"2Logn)
B) 0@®\2)
C) = O(nLognLogn)
D) O(nLogn)

40. Why is the insertion sort most efficient when the original data are almost sorted in
order?
A) when the sorted portion of the array, has to move any elements at all.
B) when its inserting elements into the sorted portion of the array, it barely has to
move any elements atall.
C) BothAandB
D) None of these

19(A) 1) [P.T.O.
41. Suppose a circular queue of capacity (n— 1) elements is implemented with an array ofn
elements. Assume that the insertion and deletion operations are carried out using REAR
and FRONT as array index variables, respectively. Initially, REAR = FRONT =0. The
conditions to detect queue full and queue empty are
A) Full: REAR+1) modn =FRONT, empty: REAR=FRONT
B) Full: (REAR+])mod n==FRONT, empty: (FRONT+1) mod n =REAR
C) Full: REAR =FRONT, empty: (REAR+1) mod n=—FRONT
D) Full: (FRONT+1)modn=—REAR, empty: REAR = FRONT

42. A program P reads in 500 integers in the range [0..100] representing the scores of 500
students: It then prints the frequency of each score above 50. What would be the best way
for P to store the frequencies?
A) Anarray of 50 numbers
B) Anarray of 100 numbers
C) Anarray of 500 numbers
D) A dynamically allocated array of 550 numbers

43. Each program module contains its own list of variables called
A) Global variable
B) Local variable
C) Static variable
D) Dynamic variable

44. Consider an implementation of an unsorted singly linked list. Suppose it has its
representation with a head pointer only. Given the representation, which of the following
operation can be implemented in O(1) time?
I) Insertion at the front of the linked list
I) Insertion at the end of the linked list
1) Deletion of the front node of the linked list
IV) Deletion of the last node of the linked list
A) Iandll
B) IandIl
C) ILMHandII
D) LIandIV

4s. In C++ the execution is always begins at


A) main()
B) Declaration()
C) Sub function()
D) Class()

19(A) az)
46. In a dynamic initialization, the initial value of an object may be provided during
time.

A) Compile
B) Run
C) BothA&B
D) None

47. In C++ Size operator is followed in syntax is


A) (Size oft)

B) (sizeof)

C) (SIZEOF)
D) (&Sizeof)

48. In C++ does not permit an int value to be automatically converted to an value.

A) Class
B) Float
C) Emum

D) longint

49. A is used to destroy the object that have beén created by a

A) Destructor, Constructor
B) * Constructor, Destructor

C) Inheritance, Dynamic binding

D) Dynamic binding, Inheritance

50. The mechanism of deriving a class from another derived class is known as

A) Hierarchical inheritance

B) Multilevel inheritance
C) Single inheritance
D) Hybridinheritance

19(A) 13) [P.T..


51. The first argument arge represents the number of arguments in the command line known
as
A) argument vector
B) command-line arguments
C) counter
D) argument counter

52. All inline functions must.be defined they are called.


A) After
B) Before
C) Middle
D) None

53. When we use the same function in both the base and derived classes, the function in base
class is declared virtual using the keyword preceding its normal declaration.
A) virtual i
B) pointer
C). Cint
D) Static
Ay

54. Thei important application of the pointer is to retum the object it points to, the following
invoke object statement will be

A) return();
B) return *this;

) return(this) .

D) return &this;

55. The sets the specified flags and leaves others unchanged.
A) setf()
B) setw()

O flag()
D) precision()

14
56. Arrange the following activities to form a general software engineering process model.
Manufacture
Maintain
Test
Install
Design
Specification
6,5,1,3,4,2
1,2,4,3,6,5
6,1,4,2,3,5
1,6,5,2,3,4

57.. Define Agile scrum methodology.


A) project management that emphasizes incremental progress
B) project management that emphasizes decremental progress
© project management that emphasizes neutral progress
D) project management that emphasizes no progress

58. According to ISO 9001, inspection and testing come under which management
responsibility?
A) Process control
B) Document control
©) Control of nonconforming products
D) Servicing

59. Software Configuration Management can be administered in several ways. These include
4) A single software configuration management team for the whole organization
B) A separate configuration management team for each project
) Software Configuration Management distributed among the project members
D) All of the mentioned

60. is an example of an RSL language content


A) Data
B) Initial Value
©) BothAand B
D) None of the above
19(A) 15) [P.T.O.
© 61. Whatis Cyclomatic complexity?
A) Black box testing
B) Whitebox testing
C) Yellow box testing
D) Green box testing

62. A software company needs to develop a project that is estimated as 1000 function points
and is planning to use C++ as the programming language whose approximate lines of
codes per function point are accepted as 50. Considering a=1 .4 as the multiplicative
factor, d=0.33 as an exponertial factor for the basic COCOMO duration equation,
approximately how long does tre project take to complete?
A) 11.2 months
B) 12.2 months
C) 132 months
D) 10.2 months

63. Assume the following regarding the development of a software system P: estimate
d
lines of codes of p:33,480 LOC, Average productivity for p:620 LOC per person month,
number of software developers:6, Average salary of a software developer:50,000 per
month. If B, D, and C are estimated development effort (in person months), estimated
development time (in months), and estimated development cost (in lac) respectively,
then E, D, and C are
A) 4882
B) 54927
C) 60,10,30
D) 42,721

64. A legacy software system has 940 modules. The latest release required that 90 of these
modules were removed. Compute the software maturity index for the system.
A 0.849
B) 0.524
0 0725
D) 0923

65. The algorithm often took too long to converge the count to infinity problem, and it was
replaced by an entirely new algorithm called
A) Packets
B) Link state routing
C) Distance vector routing.
D) IPV6

19(A) (16)
66. DNS is defined in

A) RFCs 1034 & 1035

B) RFCs 1036 & 1037

© RFCs 1086 & 1087

D) RFCs 1038 & 1039

67. The first class of encryption algorithm used same key for dectyption & encryption called

A) Symmetric -Key Algorithm

B) Assymmetric-Key Algorithm

0 Cipher Key Algorithm

D) AandB

68. The cipher was widely adopted by the industry for use in security products called

A DES-Data Encryption Standard

B) AES-Advanced Encryption Standard

0 Both DES & AES

D) None

69. The Public key and private key consist of

A) (c,n) & (P,n)

B) (e,n) & (d,n)

O (c.e) & (d,e)

D) (e.n) & (e.p)

70. When HTTP is used over SSL, it is called


A) Secure HTTP

B) Unsecure HTTP

©) SSLHTTP

D) sHTTP

[P.T.0.
19(A) a”n
71. The is an architectural framework for accessing linked documents spread out
over millions of machines on the internet.

A) ‘World Wide Web

B) OsI

) Three-tier architecture

D) ‘World Web

72. The OSImodel is the extension of.

A) Open Systems Interconnection.

B) Open Systems Intraconnection

©) Open Server Interconnection

D) Open service Interconnection

T3 A can call a constructor method defined by its supetclass.

Super Class
Abstract class
Subclass

None of the class

74. A bridge that communicate with an existing driver.


IDBC
ODBC
JDBC-ODBC
None

75. The statement defines namespace in which classes are stored.


Package

Inheritance

Hierarchy

Access Protection

as)
76. If a class implements more than one interface, then the interfaces are separated with
a

A) Semi colon
B) Colon
C) Double colon
D) Comma

77. Which define the interface to the stack independently of the details of the implementation.
A) Push()
B) Pop()
C) Push()andPop()
D) Noneoftheabove

78. encapsulate a thread of execution.


A) Runnable
B) Thread
C) Stop
D) Interface

79. The easiest way to create a thread is to create a class that implements the
interface.
A) Runnasble
B) Thread
C) Start()
D) Main()

80. The four abstract classes built in Java stream-based /O is


A) InputStream, OutputStream, Reader, Writer
B) Reader, Writer, File, Accept

C) Inputfile, Outputfile, exit,main


D) Noneoftheabove

19) [P.T.O.
19(4)
81. Another useful file utility methods are
A) mkdir()
B) mkdirs()
C) nikdir() and mkdirs()
D) Files()

82. The statement is optional, if we omit the execution will continue on the next
case.
A) Break
B) Continue
C) Switch
D) Default

83. is both a TCP/IP application and a protocol for connecting a local computer
to a remote computer. :
A) TELNET
B) FIP
0 TCP
D) UDP

84, uses IP to deliver packets to the upper layer applications and provides a
reliable stream of data among computers on the network.
A) TELNET
B) HITP
C) FIP
D) TCpIP

85. Thereisaunique __ for any hypertext item on the net.


A) URL
B) hitp
C) Hyperspace
D) None.

86. In Http service by default uses port the gopher service uses port
A) 70,0
B) 50,80
C) 80,70
D) 10,70

19(A) 0)
87. The Scheme for this pathname type of URL is
A) hitp
B) SMIP
C) FIP
D) URLs
88. In order to keep all the files straight, each person is given a specific directory called

A) URL
B) Page directory
C) Home directory
D) EventDirectory

89. The thirdway to connect to the internet with windows through


A) MAN
B) LAN
C) WAN
D) BothA&B
¥

90. Which servers run to allow them to respond to client request for information is
A) IS '
B) Web clients
C) Webserver
D) Browser

91. Web clients run special software called a


A) Browser
B) Client
€) Server
¢ HIML
{ :
92. e architecture that provides the foundation for managed execution in the NET
Framework is known as
A) Common Execution System (CES)
B) Common type system (CTS)
C) NET Execution
D) Common Run Enivronment (CRE)

93. Which of the following extension is used to represent the Windows Scripting source
file?
A) WSF
B) .VBS
C) .netS
D) SF
@n [P.T.O.
19(8)
94. A procedure-level variable is declared using keyword.
A) - Private
B) Public
C) Dim
D) Static

95. The Visual Basic .NET language defines___fundamental data types


A) 10
B) 12
€) -7
D) 8

96. Unary Plus and Unary Minus can also be considered operators in VB.
A) Arithmetic
B) Relational
C) Assignment
D) Concatenation _

97. The Keyword to be used for Array Parameter in VB is


A) ParamArray
B) Byval
C) Optional
D) ArrayParam

98. is'a counter-controlled loop.


A) For..nextloop
B) Do..whileloop
C) While loop
D) Ifstatement

99. The CLR is based on model exception —handling


A) Termination
B) Resumption
C) Termination and Resumption
D) Skip

100. can access data from relational and non-relational databases.


A) OLEDB
B) Jetdatabase engine
C) ODBC
D) None of these

19(A) ' : 22)


ROUGH WORK

19(4) 23) [P.T.O.


ROUGH WORK

19(A) 24

You might also like