0% found this document useful (0 votes)
33 views8 pages

Test No 5 Full Syllabus HPSC Subjective - 23271685 - 2 - 230925 - 073953

The document is a question paper for the HPSC exam, consisting of 18 questions that cover various topics in computer science and programming. Candidates are required to attempt any 15 questions, with each question carrying 10 marks. Specific instructions regarding the format, answer limits, and question attempts are provided to ensure clarity in the examination process.

Uploaded by

Deepti C
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)
33 views8 pages

Test No 5 Full Syllabus HPSC Subjective - 23271685 - 2 - 230925 - 073953

The document is a question paper for the HPSC exam, consisting of 18 questions that cover various topics in computer science and programming. Candidates are required to attempt any 15 questions, with each question carrying 10 marks. Specific instructions regarding the format, answer limits, and question attempts are provided to ensure clarity in the examination process.

Uploaded by

Deepti C
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/ 8

2023

HPSC
Time: 3 hours] [Maximum Marks : 150
QUESTION PAPER SPECIFIC INSTRUCTIONS
(Please read each of the following instructions carefully before attempting
questions)
(i) There are 18 questions , all printed in English only.

18 प्रश्न हैं, सभी केवल अंग्रेजी में छपे हैं।

(ii) Candidate has to attempt any 15 questions in this test only .

उम्मीदवार को इस परीक्षा में केवल 15 प्रश्नों का उत्तर दे ना होगा।

(iii) Each question carry 10 Marks.

प्रत्येक प्रश्न 10 अंक का है ।

(iv) Word limit in questions , wherever specified should be adhered to.

प्रश्नों में शब्द सीमा, जहां भी ननर्दिष्ट हो, का पालन ककया जाना चार्हए।

(v) Attempts of questions shall be counted in sequential order. Unless


struck off, attempt of a question will be counted even if attempted
partly. Any page or portion of the page left blank in the question–cum-
answer booklet must be clearly struck off.

प्रश्नों के प्रयासों को क्रममक क्रम में गगना जाएगा। जब तक काट न र्दया जाए,
ककसी प्रश्न का प्रयास गगना जाएगा, भले ही आंमशक रूप से प्रयास ककया गया
हो। प्रश्न-सह-उत्तर पुस्ततका में खाली छोडे गए ककसी भी पष्ृ ठ या पष्ृ ठ के भाग
को तपष्ट रूप से काट र्दया जाना चार्हए।

(vi) Answer to the question must be confined only to the space provided
for each question . No extra/additional sheet will be provided.
प्रश्न का उत्तर केवल प्रत्येक प्रश्न के मलए र्दए गए तथान तक ही सीममत होना
चार्हए। कोई अनतररक्त/अनतररक्त शीट प्रदान नहीं की जाएगी।

(vii) Answer must be written in the authorized medium. No Marks will be


given for answers written in a medium other than the authorized one.

उत्तर अगिकृत माध्यम में मलखा जाना चार्हए। अगिकृत माध्यम के अलावा
ककसी अन्य माध्यम में मलखे गए उत्तरों के मलए कोई अंक नहीं र्दए जाएंगे।

:- QUESTION SECTION:-

Q- 1 : Draw the block diagram of a computer system. Briefly write about the
functionality of each component. 10 Marks

Q – 2: Write a python program to remove duplicates from a list in python.


Example:
sample_list = [11, 15, 13, 16, 13, 15, 16, 11]
output_list = [11,15,13,16] 10 Marks

Q – 3: . (i) What is the output of the following python code?


a, b, c = 1, 1, 1
d = 0.3
e=a+b+c-d
f=a+b+c == d
print(e)
print(f) 5 Marks

(ii) Write short notes on Keywords in python. 5 Marks

Q – 4: Explain how python and SQL can be integrated with each other? 10
Marks
Q – 5: A school has a rule that each student must participate in a sports activity.
So each one should give only one preference for sports activity. Suppose there
are five students in a class, each having a unique roll number. The class
representative has prepared a list of sports preferences as shown below.
Answer the following:
Table: Sports Preferences
Roll_no Preference
9 Cricket
13 Football
17 Badminton
17 Football
21 Hockey
24 NULL
NULL Kabaddi
a) Roll no 24 may not be interested in sports. Can a NULL value be assigned to
that student’s preference field?
b) Roll no 17 has given two preferences in sports. Which property of relational
DBMC is violated here? Can we use any constraint or key in the relational DBMS
to check against such violation, if any?
c) Kabaddi was not chosen by any student. Is it possible to have this tuple in
the Sports Preferences relation? 10 Marks

Q- 6: Explain the following devices:


a) Switch
b) Repeater
c) Router
d) Gateway
e) NIC 2+2+2+2+2 marks
Q – 7 (i) Differentiate between HTTP and HTTPS. 5 marks
(ii) Write short note on SMTP Protocol. 5 marks

Q- 8: The following C function takes a singly-linked list as input argument. It


modified the list by moving the last element to the front of the list and
returns the modified list. Some part of the code is left blank.
typed of struct node
{
int value;
struct node*next:
} Node;
Node *mode_to front (Node *head)
{
Node *p, *q;
if(head ==NULL)|| (head →next ==NULL))
return head;
q =NULL;
p=head;
while (p →next !=NULL)
{
q= p;
p=p →next;
}
-----------
return head;
}
What code of lines will be fixed at blank space? 10 Marks

Q – 9: (i) Suppose a circular queue of capacity (n - 1) elements is implemented


with an array of n elements. Assume that the insertion and deletion operations
are carried out using REAR and FRONT as array indeed variables, respectively.
Initially, REAR= FRONT =0.The conditions to detect queue full and queue
empty are ___________. 5 marks
(ii) The result evaluating the postfix expression
10 5 + 60 6 / * 8 – is -------- 5 Marks
Q – 10 : (i) Consider the following rooted tree the vertex labelled P as the root:-

The order in which the nodes are visited during an in order traversal of the tree
is __________. 5 marks

(ii) Which of the following is/are correct inorder traversal sequences of binary
search trees?
1. 3,5,7,8,15,19,25
2. 5,8,9,12,10,15,25
3. 2,7,10,8,14,16,20
4. 4,6,7,9,18,20,25 5 marks

Q – 11. Explain various I/O scheduling algorithms by taking suitable example?


10 marks
Q – 12: What do you mean by Semaphore. Explain its various types. 10 marks

Q-13 : Explain various Deadlock prevention techniques in detail. 10 marks


Q – 14: (a) Let N be an NFA with n states. Let k be the number of states of a
minimal DFA which is equivalent to N. What is the relation between k and n?
2 marks
(b) Consider the following statements: Identify True or false?
(i) If L1 U L2, is regular, then both L1 and L2 must be regular.
(ii) The class of regular languages is closed under infinite union.
3 marks
© What is the Regular expressions for the set of all binary strings with an
odd number of 1's? 5 marks

Q- 15 : (i) The number of tokens in the following C statement


Printf (“i= %d, &i= %x”, i, &i); is 5 marks
(ii) A lexical analyser uses the following patterns to recognize three tokens
T1, T2, and T3 over the alphabet {a, b, c}.
T1: a?(b|c)*a
T2: b?(a|c)*b
T3: c?(b|a)*c
Note that ‘x?’ means 0 or 1 occurrence of the Symbol x. Note also that the
analyzer outputs the token that matches the longest possible prefix. If the
string bbaacabc is processed by the analyzer, what is the sequence of tokens
it outputs? 5 marks

Q- 16: (i) Let α denote the the transition function and α’ denote extended
transition function of the €-NFA whose transition table is given below:
α € a B
->q0 {q2} {q1} {q1}
q1 {q2} {q2} {q3}
q2 {q0} ɸ ɸ
q3 ɸ ɸ {q2}

What is α(q2,aba) ? 5 marks

(ii)Consider the following language :


L= {x ∈ {a,b}* | number of a’s in x is divisible by 2 but not divisible by 3}
The minimum number of states in a DFA that accepts L is __________. 5 marks

Q.17 Explain following Aggregate functions in SQL by taking suitable example.


(i) MAX()
(ii) MIN ()
(iii) AVG()
(iv) SUM()
(v) COUNT() 2+2+2+2+2 marks

Q.18 Explain the following :


(i) Sensors
(ii) Smart cities
(iii) Robotics 4+3+3 marks

You might also like