<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									CSS Computer Science Paper 2022 - Computer Science				            </title>
            <link>https://cssforum.net/group-i-papers-computer-science/css-computer-science-paper-2022/</link>
            <description>CSS Forum Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sat, 15 Aug 2026 13:23:39 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>CSS Computer Science Paper 2022</title>
                        <link>https://cssforum.net/group-i-papers-computer-science/css-computer-science-paper-2022/#post-81354</link>
                        <pubDate>Sat, 15 Aug 2026 11:59:02 +0000</pubDate>
                        <description><![CDATA[FEDERAL PUBLIC SERVICE COMMISSIONCOMPETITIVE EXAMINATION FOR RECRUITMENT TO POSTSIN BPS-17 UNDER THE FEDERAL GOVERNMENT, 2022
COMPUTER SCIENCE, PAPER-I
TIME ALLOWED: THREE HOURS
PART-I (M...]]></description>
                        <content:encoded><![CDATA[<p style="text-align: center"><span style="font-size: 14pt"><strong>FEDERAL PUBLIC SERVICE COMMISSION</strong></span><br /><span style="font-size: 14pt"><strong>COMPETITIVE EXAMINATION FOR RECRUITMENT TO POSTS</strong></span><br /><span style="font-size: 14pt"><strong>IN BPS-17 UNDER THE FEDERAL GOVERNMENT, 2022</strong></span></p>
<p class="PDq2pG_selectionAnchorContainer" style="text-align: center" data-start="457" data-end="486"><span style="font-size: 14pt"><strong data-start="457" data-end="486">COMPUTER SCIENCE, PAPER-I</strong></span><span class="PDq2pG_selectionAnchor" aria-hidden="true"></span></p>
<p data-start="488" data-end="517"><strong data-start="488" data-end="517">TIME ALLOWED: THREE HOURS</strong></p>
<p data-start="519" data-end="628"><strong data-start="519" data-end="556">PART-I (MCQS): MAXIMUM 30 MINUTES</strong><br data-start="556" data-end="559" /><strong data-start="559" data-end="595">PART-I (MCQS) MAXIMUM MARKS = 20</strong><br data-start="595" data-end="598" /><strong data-start="598" data-end="628">PART-II MAXIMUM MARKS = 80</strong></p>
<h3 data-section-id="ynfaae" data-start="630" data-end="638">NOTE</h3>
<p data-start="640" data-end="699">(i) Part-II is to be attempted on the separate Answer Book.</p>
<p data-start="701" data-end="833">(ii) Attempt <strong data-start="714" data-end="737">ONLY FOUR questions</strong> from PART-II by selecting <strong data-start="764" data-end="799">TWO questions from EACH SECTION</strong>. All questions carry equal marks.</p>
<p data-start="835" data-end="899">(iii) All parts of each question must be attempted at one place.</p>
<p data-start="901" data-end="983">(iv) Write the question number in the Answer Book according to the question paper.</p>
<p data-start="985" data-end="1076">(v) No page or space should be left blank between answers. All blank pages must be crossed.</p>
<p data-start="1078" data-end="1212">(vi) Extra attempts of any question or any part of an attempted question will not be considered. <span class="contents" data-content-reference-start="1155" data-content-reference-end="1172"><span class="" data-state="closed"></span></span></p>
<div style="text-align: center" data-section-id="xvpp4v" data-start="1214" data-end="1224"><strong><span style="font-size: 14pt">PART-II</span></strong></div>
<div style="text-align: center" data-section-id="9i208z" data-start="1226" data-end="1239"><strong><span style="font-size: 14pt">SECTION-A</span></strong></div>
<h3 data-section-id="ynro23" data-start="1241" data-end="1249">Q. 2</h3>
<p data-start="1251" data-end="1483"><strong data-start="1251" data-end="1258">(a)</strong> Using C++, write a function <code data-start="1287" data-end="1303">pattern(int n)</code> that produces the specified pattern. Pay particular attention to spacing and clearly state the function's return type. The solution should work for any input value of <code data-start="1471" data-end="1474">n</code>. <strong data-start="1476" data-end="1483">(8)</strong></p>
<p data-start="1485" data-end="1536"><strong data-start="1485" data-end="1492">(b)</strong> Differentiate between the following fields:</p>
<ul data-start="1538" data-end="1666">
<li data-section-id="n5uyxn" data-start="1538" data-end="1556">Computer Science</li>
<li data-section-id="sd9q0u" data-start="1557" data-end="1579">Software Engineering</li>
<li data-section-id="1ocmvwi" data-start="1580" data-end="1604">Information Technology</li>
<li data-section-id="s8u5rm" data-start="1605" data-end="1626">Information Systems</li>
<li data-section-id="18hzcja" data-start="1627" data-end="1649">Computer Engineering</li>
<li data-section-id="167sxw1" data-start="1650" data-end="1666">Bioinformatics</li>
</ul>
<p data-start="1668" data-end="1675"><strong data-start="1668" data-end="1675">(6)</strong></p>
<p data-start="1677" data-end="1778"><strong data-start="1677" data-end="1684">(c)</strong> Determine the output of the given C++ code involving an integer array and pointer arithmetic:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="contents">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse/1.1 overflow-clip rounded-3xl  dark: lxnfua_clipPathFallback">
<div class="pointer-events-none absolute inset-x-4 top-12 bottom-4">
<div class="pointer-events-none sticky z-40 shrink-0 z-1!">
<div class="sticky bg-token-border-light"> </div>
</div>
</div>
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="">
<div class="relative">
<div class="">
<div class="relative z-0 flex h-full min-h-0 max-w-full">
<div id="5792e6ef-9b63-4b44-8de2-35df9ab19178:0:editor" class="Rx43rG_codemirror z-10 flex h-full min-h-0 w-full flex-col items-stretch" dir="ltr">
<div class="cm-editor ͼ1 ͼ2 ͼd ͼr">
<div class="cm-announced" aria-live="polite"> </div>
<div class="cm-scroller">
<div class="cm-content" role="textbox" aria-label="Edit code" data-language="cpp">
<div class="cm-line"><span class="ͼm">int</span> <span class="ͼm">ary</span> = {<span class="ͼj">1</span>,<span class="ͼj">2</span>,<span class="ͼj">3</span>,<span class="ͼj">4</span>};</div>
<div class="cm-line"><span class="ͼm">int</span> *<span class="ͼm">p1</span> = <span class="ͼm">ary</span> <span class="ͼg">+</span> <span class="ͼj">3</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">p1</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
<div class="cm-line"><span class="ͼm">int</span> *<span class="ͼm">p2</span> = &amp;<span class="ͼm">p1</span>;</div>
<div class="cm-line">*<span class="ͼm">p2</span> = <span class="ͼj">10</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">ary</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="">
<div class=""> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="1912" data-end="1957"><strong data-start="1912" data-end="1919">(6)</strong> <span class="contents" data-content-reference-start="1880" data-content-reference-end="1897"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro22" data-start="1959" data-end="1967">Q. 3</h3>
<p data-start="1969" data-end="2276"><strong data-start="1969" data-end="1976">(a)</strong> Complete the given C++ function to find the number of <strong data-start="2031" data-end="2052">distinct elements</strong> in an array in <strong data-start="2068" data-end="2076">O(n)</strong> time. The array elements are within the range <strong data-start="2123" data-end="2135"></strong>, and <code data-start="2141" data-end="2144">n</code> is significantly greater than 100. For example, the array <code data-start="2203" data-end="2222">{3,1,3,8,2,1,8,2}</code> contains four distinct elements: <code data-start="2256" data-end="2267">{1,2,3,8}</code>. <strong data-start="2269" data-end="2276">(8)</strong></p>
<p data-start="2278" data-end="2374"><strong data-start="2278" data-end="2285">(b)</strong> Write a detailed note on the principles of <strong data-start="2329" data-end="2365">Information Security and Privacy</strong>. <strong data-start="2367" data-end="2374">(6)</strong></p>
<p data-start="2376" data-end="2431"><strong data-start="2376" data-end="2383">(c)</strong> Determine the output of the following C++ code:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="contents">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse/1.1 overflow-clip rounded-3xl  dark: lxnfua_clipPathFallback">
<div class="pointer-events-none absolute inset-x-4 top-12 bottom-4">
<div class="pointer-events-none sticky z-40 shrink-0 z-1!">
<div class="sticky bg-token-border-light"> </div>
</div>
</div>
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="">
<div class="relative">
<div class="">
<div class="relative z-0 flex h-full min-h-0 max-w-full">
<div id="5792e6ef-9b63-4b44-8de2-35df9ab19178:1:editor" class="Rx43rG_codemirror z-10 flex h-full min-h-0 w-full flex-col items-stretch" dir="ltr">
<div class="cm-editor ͼ1 ͼ2 ͼd ͼr">
<div class="cm-announced" aria-live="polite"> </div>
<div class="cm-scroller">
<div class="cm-content" role="textbox" aria-label="Edit code" data-language="cpp">
<div class="cm-line"><span class="ͼm">int</span> <span class="ͼm">v1</span> = <span class="ͼj">55</span>;</div>
<div class="cm-line"><span class="ͼm">int</span>* <span class="ͼm">p1</span> = &amp;<span class="ͼm">v1</span>;</div>
<div class="cm-line"><span class="ͼm">int</span>* <span class="ͼm">p2</span>;</div>
<div class="cm-line"><span class="ͼm">p2</span> = <span class="ͼm">p1</span>;</div>
<div class="cm-line">*<span class="ͼm">p1</span> = <span class="ͼj">20</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> *<span class="ͼm">p2</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">v1</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="">
<div class=""> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="2542" data-end="2587"><strong data-start="2542" data-end="2549">(6)</strong> <span class="contents" data-content-reference-start="2490" data-content-reference-end="2507"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro25" data-start="2589" data-end="2597">Q. 4</h3>
<p data-start="2599" data-end="2839"><strong data-start="2599" data-end="2606">(a)</strong> Write a C++ program to determine whether a string is a <strong data-start="2662" data-end="2676">palindrome</strong> or not. The string must be taken from the user using <code data-start="2730" data-end="2745">cin.getline()</code>. The program must be general and should not use any string-related library function. <strong data-start="2831" data-end="2839">(12)</strong></p>
<p data-start="2841" data-end="2899"><strong data-start="2841" data-end="2848">(b)</strong> Determine the output of the following C++ program:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="contents">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse/1.1 overflow-clip rounded-3xl  dark: lxnfua_clipPathFallback">
<div class="pointer-events-none absolute inset-x-4 top-12 bottom-4">
<div class="pointer-events-none sticky z-40 shrink-0 z-1!">
<div class="sticky bg-token-border-light"> </div>
</div>
</div>
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="">
<div class="relative">
<div class="">
<div class="relative z-0 flex h-full min-h-0 max-w-full">
<div id="5792e6ef-9b63-4b44-8de2-35df9ab19178:2:editor" class="Rx43rG_codemirror z-10 flex h-full min-h-0 w-full flex-col items-stretch" dir="ltr">
<div class="cm-editor ͼ1 ͼ2 ͼd ͼr">
<div class="cm-announced" aria-live="polite"> </div>
<div class="cm-scroller">
<div class="cm-content" role="textbox" aria-label="Edit code" data-language="cpp">
<div class="cm-line"><span class="ͼf">#include</span> <span class="ͼk">&lt;iostream.h&gt;</span></div>
<div class="cm-line"> </div>
<div class="cm-line"><span class="ͼm">int</span> <span class="ͼm">main</span>() {</div>
<div class="cm-line"><span class="ͼm">int</span> <span class="ͼm">a</span> = <span class="ͼj">12</span>, <span class="ͼm">b</span> = <span class="ͼj">25</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼk">"a = "</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">a</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼk">"b = "</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">b</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
<div class="cm-line"><span class="ͼm">cout</span> <span class="ͼg">&lt;&lt;</span> <span class="ͼk">"a | b = "</span> <span class="ͼg">&lt;&lt;</span> (<span class="ͼm">a</span> <span class="ͼg">|</span> <span class="ͼm">b</span>) <span class="ͼg">&lt;&lt;</span> <span class="ͼm">endl</span>;</div>
<div class="cm-line"><span class="ͼg">return</span> <span class="ͼj">0</span>;</div>
<div class="cm-line">}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="">
<div class=""> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="3098" data-end="3143"><strong data-start="3098" data-end="3105">(8)</strong> <span class="contents" data-content-reference-start="3026" data-content-reference-end="3043"><span class="" data-state="closed"></span></span></p>
<h2 data-section-id="brfn2b" data-start="3145" data-end="3157">SECTION-B</h2>
<h3 data-section-id="ynro24" data-start="3159" data-end="3167">Q. 5</h3>
<p data-start="3169" data-end="3260"><strong data-start="3169" data-end="3176">(a)</strong> Define a C++ class named <strong data-start="3202" data-end="3212">Circle</strong>. Implement all five methods of object creation:</p>
<ol data-start="3262" data-end="3497">
<li data-section-id="gj0xfm" data-start="3262" data-end="3313">Default radius of 1 inch with centre at <code data-start="3305" data-end="3312">(0,0)</code>.</li>
<li data-section-id="wa37hp" data-start="3314" data-end="3353">Given radius with centre at <code data-start="3345" data-end="3352">(0,0)</code>.</li>
<li data-section-id="1k5ehqo" data-start="3354" data-end="3410">Given centre coordinates with radius assumed to be 1.</li>
<li data-section-id="1eyltjf" data-start="3411" data-end="3450">Given radius and centre coordinates.</li>
<li data-section-id="19bkl56" data-start="3451" data-end="3497">Initialization using another Circle object.</li>
</ol>
<p data-start="3499" data-end="3599">In the driver program, create five different Circle objects, each using a different method. <strong data-start="3591" data-end="3599">(10)</strong></p>
<p data-start="3601" data-end="3739"><strong data-start="3601" data-end="3608">(b)</strong> What is a <strong data-start="3619" data-end="3639">virtual function</strong> in C++? Explain its working with a suitable example. <strong data-start="3693" data-end="3701">(10)</strong> <span class="contents" data-content-reference-start="3602" data-content-reference-end="3619"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro27" data-start="3741" data-end="3749">Q. 6</h3>
<p data-start="3751" data-end="3846"><strong data-start="3751" data-end="3758">(a)</strong> Complete the following recursive C++ function to calculate <code data-start="3818" data-end="3821">k</code> raised to the power <code data-start="3842" data-end="3845">n</code>:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="contents">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse/1.1 overflow-clip rounded-3xl  dark: lxnfua_clipPathFallback">
<div class="pointer-events-none absolute inset-x-4 top-12 bottom-4">
<div class="pointer-events-none sticky z-40 shrink-0 z-1!">
<div class="sticky bg-token-border-light"> </div>
</div>
</div>
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="">
<div class="relative">
<div class="">
<div class="relative z-0 flex h-full min-h-0 max-w-full">
<div id="5792e6ef-9b63-4b44-8de2-35df9ab19178:3:editor" class="Rx43rG_codemirror z-10 flex h-full min-h-0 w-full flex-col items-stretch" dir="ltr">
<div class="cm-editor ͼ1 ͼ2 ͼd ͼr">
<div class="cm-announced" aria-live="polite"> </div>
<div class="cm-scroller">
<div class="cm-content" role="textbox" aria-label="Edit code" data-language="cpp">
<div class="cm-line"><span class="ͼm">int</span> <span class="ͼm">power</span>(<span class="ͼm">int</span> <span class="ͼm">k</span>, <span class="ͼm">int</span> <span class="ͼm">n</span>)</div>
<div class="cm-line">{</div>
<div class="cm-line"><span class="ͼe">// write your code here</span></div>
<div class="cm-line">}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="">
<div class=""> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="3916" data-end="3965">No built-in/library function may be used. <strong data-start="3958" data-end="3965">(8)</strong></p>
<p data-start="3967" data-end="4032"><strong data-start="3967" data-end="3974">(b)</strong> Compare and contrast the following encryption algorithms:</p>
<ul data-start="4034" data-end="4051">
<li data-section-id="1o4efu" data-start="4034" data-end="4039">DES</li>
<li data-section-id="1o4fbz" data-start="4040" data-end="4045">AES</li>
<li data-section-id="1o4t6w" data-start="4046" data-end="4051">RSA</li>
</ul>
<p data-start="4053" data-end="4060"><strong data-start="4053" data-end="4060">(8)</strong></p>
<p data-start="4062" data-end="4194"><strong data-start="4062" data-end="4069">(c)</strong> Determine the <strong data-start="4084" data-end="4109">Big-O time complexity</strong> of the given <code data-start="4123" data-end="4134">isPrime()</code> C++ function. <strong data-start="4149" data-end="4156">(4)</strong> <span class="contents" data-content-reference-start="4037" data-content-reference-end="4054"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro26" data-start="4196" data-end="4204">Q. 7</h3>
<p data-start="4206" data-end="4336"><strong data-start="4206" data-end="4213">(a)</strong> For the given binary-search function, draw its <strong data-start="4261" data-end="4283">control-flow graph</strong> and calculate its <strong data-start="4302" data-end="4327">cyclomatic complexity</strong>. <strong data-start="4329" data-end="4336">(8)</strong></p>
<p data-start="4338" data-end="4536"><strong data-start="4338" data-end="4345">(b)</strong> Differentiate between <strong data-start="4368" data-end="4401">white-box (glass-box) testing</strong> and <strong data-start="4406" data-end="4427">black-box testing</strong>. Explain which technique is more useful for identifying errors in a system under evaluation and why. <strong data-start="4529" data-end="4536">(6)</strong></p>
<p data-start="4538" data-end="4718"><strong data-start="4538" data-end="4545">(c)</strong> Requirements can be written using natural-language specifications. For the function <strong data-start="4630" data-end="4711">“Automatically highlight incorrect spelling mistakes in an MS Word document,”</strong> write:</p>
<ul data-start="4720" data-end="4769">
<li data-section-id="1ch4ez0" data-start="4720" data-end="4743">One user requirement.</li>
<li data-section-id="q6o4vs" data-start="4744" data-end="4769">One system requirement.</li>
</ul>
<p data-start="4771" data-end="4816"><strong data-start="4771" data-end="4778">(6)</strong> <span class="contents" data-content-reference-start="4639" data-content-reference-end="4656"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro1t" data-start="4818" data-end="4826">Q. 8</h3>
<p data-start="4828" data-end="4991"><strong data-start="4828" data-end="4835">(a)</strong> Draw a <strong data-start="4843" data-end="4863">finite automaton</strong> over the alphabet <code data-start="4882" data-end="4889">{0,1}</code> that accepts all binary strings beginning and ending with <code data-start="4948" data-end="4951">0</code>. A single <code data-start="4962" data-end="4965">0</code> is also accepted. <strong data-start="4984" data-end="4991">(8)</strong></p>
<p data-start="4993" data-end="5115"><strong data-start="4993" data-end="5000">(b)</strong> Write a <strong data-start="5009" data-end="5031">regular expression</strong> over <code data-start="5037" data-end="5044">{0,1}</code> representing strings that begin with <code data-start="5082" data-end="5087">101</code> and end with <code data-start="5101" data-end="5106">110</code>. <strong data-start="5108" data-end="5115">(6)</strong></p>
<p data-start="5117" data-end="5224"><strong data-start="5117" data-end="5124">(c)</strong> Write a <strong data-start="5133" data-end="5163">Context-Free Grammar (CFG)</strong> over <code data-start="5169" data-end="5176">{0,1}</code> for the language of binary strings of the form:</p>
<p data-start="5226" data-end="5234"><code data-start="5226" data-end="5234">0ᵃ1ᵇ0ᶜ</code></p>
<p data-start="5236" data-end="5242">where:</p>
<p data-start="5244" data-end="5255"><code data-start="5244" data-end="5255">a + c = b</code></p>
<p data-start="5257" data-end="5302"><strong data-start="5257" data-end="5264">(6)</strong> <span class="contents" data-content-reference-start="5105" data-content-reference-end="5122"><span class="" data-state="closed"></span></span></p>
<div style="text-align: center" data-section-id="h5otzr" data-start="5305" data-end="5344"><strong><span style="font-size: 14pt">COMPUTER SCIENCE, PAPER-II — CSS 2022</span></strong></div>
<div style="text-align: center" data-start="5346" data-end="5376"><span style="font-size: 14pt"><strong data-start="5346" data-end="5376">COMPUTER SCIENCE, PAPER-II</strong></span></div>
<p data-start="5378" data-end="5407"><strong data-start="5378" data-end="5407">TIME ALLOWED: THREE HOURS</strong></p>
<p data-start="5409" data-end="5518"><strong data-start="5409" data-end="5446">PART-I (MCQS): MAXIMUM 30 MINUTES</strong><br data-start="5446" data-end="5449" /><strong data-start="5449" data-end="5485">PART-I (MCQS) MAXIMUM MARKS = 20</strong><br data-start="5485" data-end="5488" /><strong data-start="5488" data-end="5518">PART-II MAXIMUM MARKS = 80</strong></p>
<h3 data-section-id="spyozg" data-start="5520" data-end="5531">PART-II</h3>
<h2 data-section-id="brfn28" data-start="5533" data-end="5545">SECTION-A</h2>
<h3 data-section-id="ynro23" data-start="5547" data-end="5555">Q. 2</h3>
<p data-start="5557" data-end="5939"><strong data-start="5557" data-end="5564">(a)</strong> Several processes are scheduled using a <strong data-start="5605" data-end="5652">preemptive Round-Robin scheduling algorithm</strong> with priorities. A higher numerical value represents a higher priority. An idle process <code data-start="5741" data-end="5749">P_idle</code> has priority 0 and runs whenever no other process is available. The time quantum is 10 units. When a process is preempted by a higher-priority process, it is placed at the end of the queue.</p>
<div class="group TyagGW_tableContainer">
<div class="TyagGW_tableWrapper flex flex-col-reverse w-fit">
<table class="w-fit min-w-(--thread-content-width)" data-start="5941" data-end="6134">
<thead data-start="5941" data-end="5981">
<tr data-start="5941" data-end="5981">
<th class="last:pe-10" data-start="5941" data-end="5951" data-col-size="sm">Process</th>
<th class="last:pe-10" data-start="5951" data-end="5962" data-col-size="sm">Priority</th>
<th class="last:pe-10" data-start="5962" data-end="5970" data-col-size="sm">Burst</th>
<th class="last:pe-10" data-start="5970" data-end="5981" data-col-size="sm">Arrival</th>
</tr>
</thead>
<tbody data-start="6003" data-end="6134">
<tr data-start="6003" data-end="6023">
<td data-start="6003" data-end="6008" data-col-size="sm">P1</td>
<td data-start="6008" data-end="6013" data-col-size="sm">40</td>
<td data-start="6013" data-end="6018" data-col-size="sm">20</td>
<td data-start="6018" data-end="6023" data-col-size="sm">0</td>
</tr>
<tr data-start="6024" data-end="6045">
<td data-start="6024" data-end="6029" data-col-size="sm">P2</td>
<td data-start="6029" data-end="6034" data-col-size="sm">30</td>
<td data-start="6034" data-end="6039" data-col-size="sm">25</td>
<td data-start="6039" data-end="6045" data-col-size="sm">25</td>
</tr>
<tr data-start="6046" data-end="6067">
<td data-start="6046" data-end="6051" data-col-size="sm">P3</td>
<td data-start="6051" data-end="6056" data-col-size="sm">30</td>
<td data-start="6056" data-end="6061" data-col-size="sm">25</td>
<td data-start="6061" data-end="6067" data-col-size="sm">30</td>
</tr>
<tr data-start="6068" data-end="6089">
<td data-start="6068" data-end="6073" data-col-size="sm">P4</td>
<td data-start="6073" data-end="6078" data-col-size="sm">35</td>
<td data-start="6078" data-end="6083" data-col-size="sm">15</td>
<td data-start="6083" data-end="6089" data-col-size="sm">60</td>
</tr>
<tr data-start="6090" data-end="6111">
<td data-start="6090" data-end="6095" data-col-size="sm">P5</td>
<td data-start="6095" data-end="6099" data-col-size="sm">5</td>
<td data-start="6099" data-end="6104" data-col-size="sm">10</td>
<td data-start="6104" data-end="6111" data-col-size="sm">100</td>
</tr>
<tr data-start="6112" data-end="6134">
<td data-start="6112" data-end="6117" data-col-size="sm">P6</td>
<td data-start="6117" data-end="6122" data-col-size="sm">10</td>
<td data-start="6122" data-end="6127" data-col-size="sm">10</td>
<td data-start="6127" data-end="6134" data-col-size="sm">105</td>
</tr>
</tbody>
</table>
</div>
</div>
<p data-start="6136" data-end="6273">Draw the <strong data-start="6145" data-end="6160">Gantt chart</strong> showing the scheduling order. Calculate the <strong data-start="6205" data-end="6224">turnaround time</strong> and <strong data-start="6229" data-end="6245">waiting time</strong> for every process. <strong data-start="6265" data-end="6273">(10)</strong></p>
<p data-start="6275" data-end="6422"><strong data-start="6275" data-end="6282">(b)</strong> A disk head initially starts at track 20 and moves in the direction of increasing tracks. The disk has 100 tracks and the request queue is:</p>
<p data-start="6424" data-end="6447"><code data-start="6424" data-end="6447">18, 25, 73, 46, 9, 92</code></p>
<p data-start="6449" data-end="6545">Using the <strong data-start="6459" data-end="6479">C-SCAN algorithm</strong>, calculate the performance in terms of average seek time. <strong data-start="6538" data-end="6545">(6)</strong></p>
<p data-start="6547" data-end="6685"><strong data-start="6547" data-end="6554">(c)</strong> Discuss the design and management issues caused by the existence of <strong data-start="6623" data-end="6638">concurrency</strong>. <strong data-start="6640" data-end="6647">(4)</strong> <span class="contents" data-content-reference-start="6468" data-content-reference-end="6485"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro22" data-start="6687" data-end="6695">Q. 3</h3>
<p data-start="6697" data-end="6901"><strong data-start="6697" data-end="6704">(a)</strong> Given a snapshot of a system, use <strong data-start="6739" data-end="6761">Banker's Algorithm</strong> to determine whether the state is safe or unsafe. If safe, show the order in which processes can complete. If unsafe, explain why. <strong data-start="6893" data-end="6901">(12)</strong></p>
<p data-start="6903" data-end="6981"><strong data-start="6903" data-end="6910">(b)</strong> Describe the different functions of a <strong data-start="6949" data-end="6972">Logical File System</strong>. <strong data-start="6974" data-end="6981">(4)</strong></p>
<p data-start="6983" data-end="7180"><strong data-start="6983" data-end="6990">(c)</strong> Explain what resources are required when creating a <strong data-start="7043" data-end="7053">thread</strong>, and how these differ from the resources required when creating a <strong data-start="7120" data-end="7131">process</strong>. <strong data-start="7133" data-end="7140">(4)</strong> <span class="contents" data-content-reference-start="6941" data-content-reference-end="6958"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro25" data-start="7182" data-end="7190">Q. 4</h3>
<p data-start="7192" data-end="7235"><strong data-start="7192" data-end="7199">(a)</strong> A pipeline consists of four stages:</p>
<ul data-start="7237" data-end="7347">
<li data-section-id="1rjsmki" data-start="7237" data-end="7261">Fetch Instruction (FI)</li>
<li data-section-id="19drnlj" data-start="7262" data-end="7311">Decode Instruction and Calculate Addresses (DA)</li>
<li data-section-id="1uogm67" data-start="7312" data-end="7332">Fetch Operand (FO)</li>
<li data-section-id="ljiq17" data-start="7333" data-end="7347">Execute (EX)</li>
</ul>
<p data-start="7349" data-end="7491">Draw the pipeline diagram for seven instructions where the <strong data-start="7408" data-end="7447">third instruction is a taken branch</strong> and there are no data dependencies. <strong data-start="7484" data-end="7491">(8)</strong></p>
<p data-start="7493" data-end="7694"><strong data-start="7493" data-end="7500">(b)</strong> A set-associative cache has 64 lines divided into sets of four lines. Main memory contains 4K blocks, with each block containing 128 words. Show the <strong data-start="7650" data-end="7685">format of main-memory addresses</strong>. <strong data-start="7687" data-end="7694">(6)</strong></p>
<p data-start="7696" data-end="7850"><strong data-start="7696" data-end="7703">(c)</strong> Explain why <strong data-start="7716" data-end="7745">DMA access to main memory</strong> is given higher priority than CPU access to main memory. <strong data-start="7803" data-end="7810">(6)</strong> <span class="contents" data-content-reference-start="7589" data-content-reference-end="7606"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro24" data-start="7852" data-end="7860">Q. 5</h3>
<p data-start="7862" data-end="7977"><strong data-start="7862" data-end="7869">(a)</strong> Describe in detail any one <strong data-start="7897" data-end="7918">routing algorithm</strong> used to resolve conflicts between path selections. <strong data-start="7970" data-end="7977">(8)</strong></p>
<p data-start="7979" data-end="8262"><strong data-start="7979" data-end="7986">(b)</strong> A company has four buildings on a campus. Each building has a 100Base-T network running to all floors. The buildings form a square, 100 meters on each side, and the network must support a data-transfer rate of 100 Mbps. Propose an appropriate network design solution. <strong data-start="8255" data-end="8262">(6)</strong></p>
<p data-start="8264" data-end="8514"><strong data-start="8264" data-end="8271">(c)</strong> Explain the main weakness in the <strong data-start="8305" data-end="8332">TCP three-way handshake</strong> that makes it exploitable by attackers. Discuss whether the backlog parameter associated with a listening socket solves this problem. <strong data-start="8467" data-end="8474">(6)</strong> <span class="contents" data-content-reference-start="8231" data-content-reference-end="8248"><span class="" data-state="closed"></span></span></p>
<h1 style="text-align: center" data-section-id="1ap2z34" data-start="8516" data-end="8527"><span style="font-size: 14pt">SECTION-B</span></h1>
<h3 data-section-id="ynro27" data-start="8529" data-end="8537">Q. 6</h3>
<p data-start="8539" data-end="8687"><strong data-start="8539" data-end="8546">(a)</strong> Find the <strong data-start="8556" data-end="8570">reflection</strong> of each given structuring element (SE) in mathematical morphology. The dot in each SE represents its origin. <strong data-start="8680" data-end="8687">(8)</strong></p>
<p data-start="8689" data-end="8894"><strong data-start="8689" data-end="8696">(b)</strong> Given the horizontal intensity profiles of the R, G and B component images of an RGB image, determine the colour that a person would see in the middle column and show the necessary working. <strong data-start="8887" data-end="8894">(8)</strong></p>
<p data-start="8896" data-end="9038"><strong data-start="8896" data-end="8903">(c)</strong> Explain the relationship between <strong data-start="8937" data-end="8965">Digital Image Processing</strong> and <strong data-start="8970" data-end="8989">Computer Vision</strong>. <strong data-start="8991" data-end="8998">(4)</strong> <span class="contents" data-content-reference-start="8733" data-content-reference-end="8750"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro26" data-start="9040" data-end="9048">Q. 7</h3>
<p data-start="9050" data-end="9122"><strong data-start="9050" data-end="9057">(a)</strong> Explain the <strong data-start="9070" data-end="9113">three-tier web application architecture</strong>. <strong data-start="9115" data-end="9122">(8)</strong></p>
<p data-start="9124" data-end="9264"><strong data-start="9124" data-end="9131">(b)</strong> Write <strong data-start="9138" data-end="9153">jQuery code</strong> to slide elements up and down and to fade elements in and out of visibility. Use HTML, CSS and jQuery. <strong data-start="9257" data-end="9264">(6)</strong></p>
<p data-start="9266" data-end="9424"><strong data-start="9266" data-end="9273">(c)</strong> What is <strong data-start="9282" data-end="9311">web application promotion</strong>? Discuss some common <strong data-start="9333" data-end="9375">web advertising (webvertising) methods</strong>. <strong data-start="9377" data-end="9384">(6)</strong> <span class="contents" data-content-reference-start="9097" data-content-reference-end="9114"><span class="" data-state="closed"></span></span></p>
<h3 data-section-id="ynro1t" data-start="9426" data-end="9434">Q. 8</h3>
<p data-start="9436" data-end="9503"><strong data-start="9436" data-end="9443">(a)</strong> Explain the process of <strong data-start="9467" data-end="9494">Web Application Testing</strong>. <strong data-start="9496" data-end="9503">(8)</strong></p>
<p data-start="9505" data-end="9609"><strong data-start="9505" data-end="9512">(b)</strong> Explain the <strong data-start="9525" data-end="9556">Document Object Model (DOM)</strong> in detail. Also discuss <strong data-start="9581" data-end="9588">XML</strong> and <strong data-start="9593" data-end="9600">RSS</strong>. <strong data-start="9602" data-end="9609">(6)</strong></p>
<p data-start="9611" data-end="9774" data-is-last-node="" data-is-only-node=""><strong data-start="9611" data-end="9618">(c)</strong> Explain how a database can be accessed from a <strong data-start="9665" data-end="9677">JSP page</strong>. Discuss database-connectivity issues in detail.</p>
<hr />
<p data-start="9611" data-end="9774" data-is-last-node="" data-is-only-node=""><strong><span style="font-size: 14pt"><a href="https://hostnezt.com/cssfiles/csspastpapers/computer/Computer%20Science%202022.pdf" target="_blank" rel="noopener">DOWNLOAD NOW</a></span></strong></p>]]></content:encoded>
						                            <category domain="https://cssforum.net/group-i-papers-computer-science/">Computer Science</category>                        <dc:creator>zarnishayat</dc:creator>
                        <guid isPermaLink="true">https://cssforum.net/group-i-papers-computer-science/css-computer-science-paper-2022/#post-81354</guid>
                    </item>
							        </channel>
        </rss>
		