The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Answers by Shaik Masthan
User Shaik Masthan
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User Shaik Masthan
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
0
votes
1
Aptitude
Ramon wants to cut a rectangular board into identical squares pieces. If the board is 18 inches by 30 inches, what is the least number of square pieces he can cut without wasting any of the board? Ans given is 15
answered
1 day
ago
in
Numerical Ability

11
views
+1
vote
2
assignment
Following C program is written to find the pairs of elements in an array whose sum is 9. The for loop will iterate over the array of size 7. The program will print the correct pairs (whose sum is 9) on iteration number a' and b'. What are the values of a' and b'? Note: for 1st iteration, i=0. For 2nd ... sum = 9; int A[7]={1,4,3,3,5,2,6}; pair(A,7,sum); } 1. 5,7 2. 2,5 3. 4,6 4. 2,3
answered
Feb 28
in
Programming

50
views
programminginc
+1
vote
3
Kenneth Rosen Edition 6 Question 45 (Page No. 346)
How many bit strings of length eight contain either three consecutive 0s or four consecutive 1s?
answered
Feb 28
in
Combinatory

1.9k
views
permutationsandcombinations
counting
+4
votes
4
Fork (ACE)
main() { if(fork()>=0) { printf("*"); if(fork()==0) { printf("*"); } else{ //do nothing } printf("*"); } How many number of times “*” will be printed?
answered
Feb 28
in
Operating System

160
views
fork
operatingsystem
+1
vote
5
Rosen example 12 Ch 5.2
Show that every sequence of $n^2$+1 distinct real numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing.
answered
Feb 24
in
Combinatory

48
views
+4
votes
6
sizeof
#include <stdio.h> int main() { int a = 1; char d[] = "ab"; printf("%d", sizeof(a+d)); return 0; } Explain the Output
answered
Feb 16
in
Programming

136
views
programminginc
sizeofoperator
0
votes
7
JEST Sample Question4
A tournament is a directed graph in which there is exactly one directed edge between every pair of vertices. Let Tn be a tournament on n vertices. (a) Use induction to prove the following statement: Tn has a directed hamiltonian path (a directed ... or a simple description of the steps in the algorithm, will suffice. What is the worst case time complexity of your algorithm?
answered
Feb 16
in
Algorithms

50
views
jest
algorithms
timecomplexity
+2
votes
8
#define doubt
#include <stdio.h> #define foo(m,n) "m##n" int main() { char x='k',y='l'; printf("%s",foo(x,y)); return 0; } Output Please explain why the output is m##n instead of k##l
answered
Feb 16
in
Programming

39
views
programminginc
+7
votes
9
GATE201955
Consider the following relations $P(X,Y,Z), Q(X,Y,T)$ and $R(Y,V)$ ... Answer: ________
answered
Feb 7
in
Databases

2.1k
views
gate2019
numericalanswers
databases
relationalalgebra
+8
votes
10
GATE201951
A relational database contains two tables Student and Performance as shown below: Student Roll_no Student_name 1 Amit 2 Priya 3 Vinit 4 Rohan 5 Smita Performance Roll_no Subject_code marks 1 A 86 1 B 95 1 C 90 2 A 89 2 C 92 3 C 80 The primary key of ... Student S, Performance P WHERE P.Marks >84 GROUP BY S.Student_name; The number of rows returned by the above SQL query is ________
answered
Feb 7
in
Databases

3k
views
gate2019
numericalanswers
databases
sql
+8
votes
11
GATE201941
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: ... Remaining Time First scheduling algorithm. If the average waiting time of the processes is $1$ millisecond, then the value of $Z$ is _____
answered
Feb 7
in
Operating System

1.9k
views
gate2019
numericalanswers
operatingsystem
processschedule
+8
votes
12
GATE201939
Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $R$, $1 \leq i \leq n$. Assume that all instances of $R$ are currently in use. Further, for all $i$, process $i$ can place a request for at most $Y_i$ additional ... $\text{Min}(X_p,X_q) \leq \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
answered
Feb 7
in
Operating System

1.6k
views
gate2019
operatingsystem
processsynchronization
+8
votes
13
GATE201937
There are $n$ unsorted arrays: $A_1, A_2, \dots, A_n$. Assume that $n$ is odd Each of $A_1, A_2, \dots, A_n$ contains $n$ distinct elements. There are no common elements between any two arrays. The worstcase time complexity of computing the median of the medians of $A_1, A_2, \dots , A_n$ is $O(n)$ $O(n \: \log \: n)$ $O(n^2)$ $\Omega (n^2 \log n)$
answered
Feb 7
in
Algorithms

3.3k
views
gate2019
algorithms
timecomplexity
+9
votes
14
GATE201935
Consider the first order predicate formula $\phi$: $\forall x [ ( \forall z \: z \mid x \Rightarrow (( z=x) \vee (z=1))) \rightarrow \exists w ( w > x) \wedge (\forall z \: z \mid w \Rightarrow ((w=z) \vee (z=1)))]$ Here $a \mid b$ denotes ... S2: Set of all positive integers S3: Set of all integers Which of the above sets satisfy $\phi$? S1 and S2 S1 and S3 S2 and S3 S1, S2 and S3
answered
Feb 7
in
Mathematical Logic

2k
views
gate2019
engineeringmathematics
discretemathematics
mathematicallogic
+12
votes
15
GATE201934
Consider the following sets: S1: Set of all recursively enumerable languages over the alphabet $\{0, 1\}$ S2: Set of all syntactically valid C programs S3: Set of all languages over the alphabet $\{0,1\}$ S4; Set of all nonregular languages over the alphabet $\{ 0,1 \}$ Which of the above sets are uncountable? S1 and S2 S3 and S4 S2 and S3 S1 and S4
answered
Feb 7
in
Theory of Computation

1.8k
views
gate2019
theoryofcomputation
countableset
+10
votes
16
GATE201930
Consider three $4$variable functions $f_1, f_2$, and $f_3$, which are expressed in sumofminterms as $f_1=\Sigma(0,2,5,8,14),$ $f_2=\Sigma(2,3,6,8,14,15),$ $f_3=\Sigma (2,7,11,14)$ For the following circuit with one AND gate and one XOR gate the output function $f$ can be expressed as: $\Sigma(7,8,11)$ $\Sigma (2,7,8,11,14)$ $\Sigma (2,14)$ $\Sigma (0,2,3,5,6,7,8,11,14,15)$
answered
Feb 7
in
Digital Logic

1.8k
views
gate2019
digitallogic
kmap
logicgates
+6
votes
17
GATE201928
Consider three machines M, N, and P with IP addresses $100.10.5.2, \: 100.10.5.5$, and $100.10.5.6$ respectively. The subnet mask is set to $255.255.255.252$ for all the three machines. Which one of the following is true? M, N, and P all belong to the same subnet Only M and N belong to the same subnet Only N and P belong to the same subnet M, N, and P belong to three different subnets
answered
Feb 7
in
Computer Networks

1.7k
views
gate2019
computernetworks
subnetting
+10
votes
18
GATE201927
Consider the following C program: #include <stdio.h> int r() { static int num=7; return num; } int main() { for (r();r();r()) printf(“%d”,r()); return 0; } Which one of the following values will be displayed on execution of the programs? $41$ $52$ $63$ $630$
answered
Feb 7
in
Programming

2.4k
views
gate2019
programminginc
+2
votes
19
GATE20192
The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has $16$ address lines denoted by $A_{15}$ to $A_0$. What is the range of address (in hexadecimal) of the memory system that can get enabled by the chip select (CS) signal? C800 to CFFF CA00 to CAFF C800 to C8FF DA00 to DFFF
answered
Feb 7
in
CO & Architecture

2k
views
gate2019
coandarchitecture
dram
+22
votes
20
GATE20191
A certain processor uses a fully associative cache of size $16$ kB, The cache block size is $16$ bytes. Assume that the main memory is byte addressable and uses a $32$bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor? $24$ bits and $0$ bits $28$ bits and $4$ bits $24$ bits and $4$ bits $28$ bits and $0$ bits
answered
Feb 7
in
CO & Architecture

2.9k
views
gate2019
coandarchitecture
cachememory
+1
vote
21
GATEBOOK2019 Mock Test136
Which of the following statements is/are TRUE? $A \cup (B − C)$ always equals $ (A \cup B) − (A \cup C) $ $A \cap (B − C) $ always equals $(A \cap B) − (A \cap C) $ $A − (B \cap C) $ always equals $(A − B) \cup (A − C) $ $I$ only $I$ and $II$ only $II$ and $III$ only $I, II,$ and $III$
answered
Jan 30
in
Set Theory & Algebra

103
views
gb2019mock1
sets
discretemathematics
+1
vote
22
MadeEasy Test Series
What is the number of seven digit integers possible with sum of the digits equal to 11 and formed by using the digits 1, 2 and 3 only?
answered
Jan 29
in
Combinatory

80
views
+9
votes
23
GATEBOOK2019 Mock Test141
Consider the two dimensional array A int A[50][50]; // int size is 4 bytes where $A[0][0]$ is at location $200$ in a paged memory system with pages of size $200$ bytes. A small process that manipulates the matrix resides in page $0$ (locations $0$ to $199$). ... ? Assume Row Major order for memory allocation. for(int j=0;j<50;j++) for(int i=0;i<j;i++) A[i][j]=0;
answered
Jan 23
in
Operating System

451
views
gb2019mock1
numericalanswers
pagereplacement
+3
votes
24
Seld doubt DM
Consider a tree T with n vertices and (n – 1) edges. We define a term called cyclic cardinality of a tree (T) as the number of cycles created when any two vertices of T are joined by an edge. Given a tree with 10 vertices, what is the cyclic cardinality of this tree?
answered
Jan 16
in
Graph Theory

81
views
+2
votes
25
GATEBOOK2019 Grand Test CN17
An organization has a class $C$ ... $W: 255.255.255.223,\: X \& Y\& Z : 255.255.255.223$
answered
Jan 16
in
Computer Networks

83
views
gb2019gtcn
subnetting
ipaddressing
+2
votes
26
Self Doubt
In crash recovery in the checkpoint mechanism. Till the last checkpoint for all committed transactions redo will be done and all uncommited transactions undo is done. Can anyone explain what is the reason behind it ?
answered
Jan 9
in
Databases

34
views
trasaction
recovery
crash
checkpoint
0
votes
27
GATE 2001 ECE
The digital block in the figure is realized using two positive edge triggered flip flops. Assume that for t<t0, Q1=Q2=0. The correct realization is given by which of the following figures?
answered
Jan 5
in
Digital Logic

51
views
digitallogic
sequentialcircuit
flipflop
+9
votes
28
GATE2017244
Two transactions $T_1$ and $T_2$ are given as $T_1:r_1(X)w_1(X)r_1(Y)w_1(Y)$ $T_2:r_2(Y)w_2(Y)r_2(Z)w_2(Z)$ where $r_i(V)$ denotes a $\textit{read}$ operation by transaction $T_i$ on a variable $V$ and $w_i(V)$ denotes a $\textit{write}$ operation by transaction $T_i$ on a variable $V$. The total number of conflict serializable schedules that can be formed by $T_1$ and $T_2$ is ______
answered
Jan 5
in
Databases

16.2k
views
gate20172
databases
transactions
numericalanswers
conflictserializable
+1
vote
29
TOTAL CONFLICT SERIALIZABLE SCHEDULES
Two transactions T1 and T2 are given as T1:r1(A) w1(A) r1(B) w1(B) r1(C) w1(C) T2:r2(B) w2(B) r2(C) w2(C) r2(D) w2(D) The total number of conflicts serializable schedules that can be formed by T1 and T2 are _____
answered
Jan 5
in
Databases

178
views
+1
vote
30
UGCNETDEC2018II51
Consider the C/C++ function f() given below: void f(char w[]) { int x=strlen(w); //length of a string char c; for (int i=0; i<x; i++) { c=w[i]; w[i]=w[xi1]; w[xi1] =c; } } It outputs ... with the characters shifted over by one position It outputs the contents of the array with the characters rearranged so they are lo longer recognized as the words in the original phrase
answered
Jan 3
in
Others

42
views
ugcnetdec2018ii
0
votes
31
UGCNETDEC2018II39
Consider the following grammar $G$: $S \rightarrow A \mid B$ $A \rightarrow a \mid c$ $B \rightarrow b \mid c$ where $\{ S, A, B\}$ is the set of nonterminals, $\{ a, b, c, \}$ is the set of terminals. Which of the following statement(s) is ... $G$. Choose the correct answer from the code given below: Code: Only $S_1$ Only $S_2$ Both $S_1$ and $S_2$ Neither $S_1$ nor $S_2$
answered
Jan 3
in
Others

40
views
ugcnetdec2018ii
0
votes
32
UGCNETDEC2018II36
Consider $R$ to be any regular language and $L_1$, $L_2$ be any two contextfree languages. Which of the following is correct? $\overline{L_1}$ is context free $\overline{(L_1 \cup L_2)} – R$ is context free $L_1 \cap L_2$ is context free $L_1 – R$ is context free
answered
Jan 3
in
Others

34
views
ugcnetdec2018ii
0
votes
33
UGCNETDEC2018II35
Consider the following languages: $L_1 = \{ a^{n+m} b^n a^m \mid n, m \geq 0 \}$ $L_2 = \{ a^{n+m} b^{n+m} a^{n+m} \mid n, m \geq 0\}$ Which of the following is correct? Code: Only $L_1$ is contextfree language Only $L_2$ is contextfree language Both $L_1$ and $L_2$ are context free languages Both $L_1$ and $L_2$ are not context free languages
answered
Jan 3
in
Others

38
views
ugcnetdec2018ii
0
votes
34
UGCNETDEC2018II33
The number od substrings that can be formed from string given by $a \: d \: e \: f \: b \: g \: h \: n \: m \: p$ is $10$ $45$ $55$ $56$
answered
Jan 3
in
Others

34
views
ugcnetdec2018ii
0
votes
35
UGCNETDEC2018II31
Let $r=a(a+b)^*, \: s=aa^*b$ and $t=a^*b$ be three regular expressions. Consider the following $L(s) \subseteq L(r )\text{ and } L(s) \subseteq L(t)$ $L(r ) \subseteq L(s) \text{ and } L(s) \subseteq L(t)$ Choose the correct answer from the code given below: Only (i) is correct Only (ii) is correct Both (i) and (ii) are correct Neither (i) nor (ii) is correct
answered
Jan 3
in
Others

35
views
ugcnetdec2018ii
0
votes
36
UGCNETDEC2018II29
Consider a ngly linked list. What is the worst case time complexity of the bestknown algorithm to delete the node a, pointer to this node is q, from the list? $O(n \: lg \: n)$ $O(n)$ $O(lg \: n)$ $O(1)$
answered
Jan 2
in
Others

60
views
ugcnetdec2018ii
+1
vote
37
UGCNETDEC2018II26
In a ternary tree, the number of internal nodes of degree $1, 2, $ and $3$ is $4, 3$, and $3$ respectively. The number of leaf nodes in the ternary tree is $9$ $10$ $11$ $12$
answered
Jan 2
in
Others

43
views
ugcnetdec2018ii
0
votes
38
UGCNETDEC2018II23
Consider two sequences $X$ and $Y$ $X=<0, 1, 2, 1, 3, 0, 1>$ $Y=<1, 3, 2, 0, 1, 0>$ The length of longest common subsequence between $X$ and $Y$ is $2$ $3$ $4$ $5$
answered
Jan 2
in
Others

36
views
ugcnetdec2018ii
0
votes
39
UGCNETDEC2018II25
A binary search tree is constructed by inserting the following numbers in order: $60, 25, 72, 15, 30, 68, 101, 13, 18, 47, 70, 34$ The number of nodes in the left subtree is $5$ $6$ $7$ $3$
answered
Jan 2
in
Others

44
views
ugcnetdec2018ii
Page:
1
2
3
4
5
6
...
10
next »
48,720
questions
52,807
answers
183,452
comments
68,470
users