CS and IT GATE 2025 SET-2 Questions with Answer

Ques 53 Operating Systems


Consider a demand paging system with three frames, and the following page reference string: 123454164513 2. The contents of the frames are as follows initially and after each reference (from left to right):

The *-marked references cause page replacements.
Which one or more of the following could be the page replacement policy/policies in use?

A

Least Recently Used page replacement policy

B

Least Frequently Used page replacement policy

C

Most Frequently Used page replacement policy

D

Optimal page replacement policy



Ques 54 Operating Systems


P={P1,P2,P3,P4} consists of all active processes in an operating system.
R={R1,R2,R3,R4} consists of single instances of distinct types of resources in the system.
The resource allocation graph has the following assignment and claim edges.
Assignment edges: R1→P1, R2→P2, R3→P3, R4→P4 (the assignment edge R1→P1 means resource R1 is assigned to process P1, and so on for others)
Claim edges: P1→R2, P2→R3, P3→R1, P2→R4, P4→R2 (the claim edge P1→R2 means process P1 is waiting for resource R2, and so on for others)
Which of the following statement(s) is/are CORRECT?

A

Aborting P1 makes the system deadlock free.

B

Aborting P3 makes the system deadlock free.

C

Aborting P2 makes the system deadlock free.

D

Aborting P1 and P4 makes the system deadlock free.



Ques 55 Operating Systems


A computer system supports a logical address space of 232 bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a b-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size.
The value of b is ______ (Answer in integer)



Ques 56 Programming and Data Structures


Consider the following C program:

Which ONE of the following will be the output of the program?

A

#Hello World!

B

Hello World!

C

ello World!

D

Hello World!d!



Ques 57 Programming and Data Structures


The output of the given C code segment is ______ (Answer in integer)



Ques 58 Programming and Data Structures


Consider the following C program:

The output of the above program is ______ (Answer in integer)



Ques 59 Programming and Data Structures


Consider the following C program:

The output of the given C program is ______ (Answer in integer)



Ques 60 Theory of Computation


Which ONE of the following languages is accepted by a deterministic pushdown automaton?

A

Any regular language.

B

Any context-free language.

C

Any language accepted by a non-deterministic pushdown automaton.

D

Any decidable language.



Ques 61 Theory of Computation


Let G1, G2 be Context Free Grammars (CFGs) and R be a regular expression. For a grammar G, let L(G) denote the language generated by G.
Which ONE among the following questions is decidable?

A

Is L(G1)=L(G2)?

B

Is L(G1)∩L(G2)=φ?

C

Is L(G1)=L(R)?

D

Is L(G1)=∅?



Ques 62 Theory of Computation


Consider the two lists List I and List II given below:
List I
(i) Context free languages
(ii) Recursive languages
(iii) Regular languages
List II
(a) Closed under union
(b) Not closed under complementation
(c) Closed under intersection
For matching of items in List I with those in List II, which of the following option(s) is/are CORRECT?

A

(i)-(a), (ii)-(b), and (iii)-(c)

B

(i)-(b), (ii)-(a), and (iii)-(c)

C

(i)-(b), (ii)-(c), and (iii)-(a)

D

(i)-(a), (ii)-(c), and (iii)-(b)



Ques 63 Theory of Computation


Let Σ={a,b,c}. For x∈Σ*, and α∈Σ, let #α(x) denote the number of occurrences of a in x.
Which one or more of the following option(s) define(s) regular language(s)?

A

{ambn|m,n≥0}

B

{a,b}*∩{ambncm-n|m≥n≥0}

C

{w|w∈{a,b}*,#a(w)≡2(mod 7),and#b(w)≡3(mod 9)}

D

{w|w∈{a,b}*,#a(w)≡2(mod 7) and #a(w)=#b(w)}



Ques 64 Theory of Computation


Let Σ={1,2,3,4}. For x∈Σ*, let prod(x) be the product of symbols in x modulo 7. We take prod(ε)=1, where ε is the null string.
For example, prod(124)=(1×2×4) mod 7=1.
Define L={x∈Σ*|prod(x)=2}
The number of states in a minimum state DFA for L is ______ (Answer in integer)



Unique Visitor Count

Total Unique Visitors

Loading......