Escolar Documentos
Profissional Documentos
Cultura Documentos
1. Question of Binary search tree to find node when 43 will not be found
Ans= Every data set was having 43 as its last element.
2 . To find complexity of Linked list .Singly circular ordered list is there if m elements are to be inserted what will be the
complexity of time.
i. O(m*n).
ii. O(m*(m+n)).
iii. O((m+n)*log(m+n))
5. Infix to Postfix expression Of A+B*(C+D)/E+F {ANS=ABCD+*E/+F+ } question is not confirm but pattern is of same
type
DBMS
1. Query from Navathe Select fname,lname from employee where eno in (select eno from works-on where pno=(select *
from project)); what is the output .
2. A query is given eg. Select name from employee where salary=salary. They ask whether query runs or not so just check
it. Ans=Query Invalid
3. What is the main use of B & B+ trees in database Ans= For queries
4. question on Left outer Join & Full outer Join. For both Variables are given & in options relationship is given to find
whichever have greater tuples.
OS
1. Using LRU how many page faults are generated. 20 pages are there Ans=6 page fault
5. If there are n processes & each process waits p time in waiting state then CPU utilization is (options are)
1. n(1-p)
2. (1-p to the power n) ANS (not sure)
3. 1-np.
4. n*p
5. A critical section is Ans = a set of instruction which is shared by many process.
General
1. Probability to find digits which not contain 7 between 100 to 999 Ans=18/25
2. Packet switching & Circuit Switching some diff are there Ans= CS take more time to established circuit.
3. A file have 3 bits for char such type of question Ans= 27000 or 24000(Confused)
5. From the set {a,b,c,d,e,f} find no. of arrangements for 3 alphabets with no data repeated. ANS=360. OR for 4 alpha
ANS=720.
C Programming
1. Array pointer is pass
Interview Questions
1. Prepare DS,DBMS,OS,TOC thoroughly may ask abt anyone everything .
10. Tcp/ip.
omputer Algorithms
1. Time Complexity
2. Which of the following cannot be implemented efficiently in Linear Linked List
1. Quicksort
2. Radix Sort
3. Polynomials
4. Insertion Sort
5. Binary Search
3. In binary search tree , n=nodes, h=height of tree. What's complexity?
1. o(h)
2. o(n*h)
3. o(nLogn)
4. o(n*n)
5. None
C Programs
1. Printf("%d%d",i++,i++);
1. Compiler Dependent
2. 4 4
3. 4 3
4. 3 4
5. None of Above
2. void main()
{
printf("persistent");
main();
}
1. Till stack overflows
2. Infinite
3. 65535
4. 34423
5. None
3. what is Swapping?
4. what does it do?
void f(int n)
{
if(n>0)
{
if(A[i]>A[j])
swap();
}
else
f(n-1);
}
1. Swap
2. Sort in Ascending order
3. Sort in Descending order
4. Computes permutation
Operating System
1. Where the root dir should be located
1. Anywhere on System disk
2. Anywhere on Disk'
3. In Main memory
4. At a fixed location on Disk
5. At fixed location on System Disk
2. Problem on Concurrency
3. Problem on Round Robin Algorithm
General
1. If x is odd, in which of the following y must be even
1. X+Y=5
2. 2(X+Y)=7
3. 2X + Y =6
4. X+2Y=7
2. 1000! How many digits? What is the most significant and Least significant digit?
DBMS
1. If table A has m rows and table B has n rows then how many rows will the following query return
SELECT A.A1,B.B1
FROM A,B
WHERE A.A3=B.B3
1. <=(m*n)
2. m*n
3. <=(m+n)
4. >=(m+n) and <=(m*n)
5. m+n
2. A Query optimizer optimizes according to which of Freshersworld.com the following criteria
1. Execution time
2. Disk access
3. CPU usage
4. Communication time
5. None
3. Which of the following is not a characteristic of a transaction
1. Atomicity
2. Consistency
3. Normalization
4. Isolation
5. Durability
4. The def. of Foreign key is there to support
1. Referential integrity
2. Constraint
3. None
5. Problem
Process A Process B
WRITELOCK(X) WRITELOCK(Y)
READ(X) READ(Y)
... ...
1. The problem is serializable
2. The problem is not serializable
3. It can be run in parallel
4. None
1. A sparse matrix is a matrix in which a node with val=0 is not represented. The whole matrix is represented by a Linked
list where node typedef struct Node
{
int row;
int col;
int value;
sparsematrix next;
} Element, *sparsematrix;
The problem is, if there are two matrix given suppose m1 and m2, then add them and return the resultant sparsematrix.
2. If suppose there are N functions say from 0,1,2,... N-1 and it's given that A[i][j]=1 if the function i contains a call to
func. j otherwise A[i][j]=0, then write a function that will form groups of related functions and print them line by line and
at the end print the number of total groups
1. If there r n processes and each process waits p time in waiting state then cpu utilization is-:
a) n(1-p)
b) n*p
2. A string of pages were given and no of page faults have to be found in LRU algorithm
3. here is a file server which provides locking for mutual exclusion . if any process locks the file and abruptly terminated
this will result in indefinitely locking .The solution they found is to implement a timer for locking of file i.e. if time outs then
server assumes that file is indefinitely locked and terminate the process –
a) this solution is perfect for mutual exclusion
b) this will solve indefinite locking
c) this will result in interleaving of file between processes
4. A critical section is –
ans a set of instruction which is shared by many processes
5. There was a question on automata ans – the resultant string will have even no of c
7. One singly circular ordered list is there if M elements are to be inserted what will be the complexity of time
a) O(M*N)
b) O(M*(M+N))
c) O ((M+N) * log(M+N))
d)none of these
8. find postfix and prefix of A + B * ( C + D ) / E + F
10. From the following when 43 will not be found by binary search (a series was given with last element 43 in each)
11. From 100 – 999 find the prob. Of getting 3 digit no with no 7 in any of its digit
a) 18/25
b) 10/25
c) 729/1000
d) none
12. from the set {a,b,c,d,e,f} find no of arrangements for 3 alphabet with no data repeated
18. void main()
{
int a[5] ={1,2,3,4,5},i,j=2;
for (i =0;i<5;i++ )
func(j,a[i]);
for (i =0;i<5;i++ )
printf(“%d”,a[i]);
}
func(int j,int *a)
{
j=j+1;
a=a+j;
}
19. oid main()
{
for (a=1;a<=100;a++)
for(b=a;b<=100;b++)
foo();
}
foo()
{}
how many times foo will be called.
a) 5050
b) 1010
c)
d)
20. A hash table has a sie of 11 and data filled in its position like{3,5,7,9,6}how many comparisons have to be made if
data is not found in the list in worst case
a) 2
b) 6
c) 11
d)
22. addition of two sparse matrix in 3 tupple notation ---time 30 min 24a tree has 1000000 nodes than how many search r
required to search a node
FIRST SECTION
a) Quati Section 15 marks
i) analytical
ii) quanti
b) C Section 10 marks
c) DSA section 10 marks
d) OS section 5 marks
C section:
1 main()
{
printf("persistant");
main();
}
ans:print the persistant till the stack overflow occur
2) f(0)=0;
f(16)=?
int f(int n)
{
if(n>100)
n=n-10;
else
something
}
ans 91;
3) queston on seek() i.e. moving file pointer pointer has to point just before the last character of the file os) what is
thrashing?
DSA
1) find number of nodes in complete binary tree of level 5
ans:-63
2) problem on queue. one queue was given and find the minimum number of insertion and deletion operation to get
desired output.
SECOND SECTION
There were two programs on c
1) create doubly linked list
2)second question was on graph there is one undirectional connected graphand we have to find connected edges in a
graph user input the adjecency list /mattrix
Hint: first find out the path mattrix by warshalls algorithm then from this mattrix u will get which are the connected nodes
which not in mattrix 0 means unconnected 1 for connected