MA Database Questions: Redpine Database Questions
Download PDF of This Page (Size: 129K) ↧
Examrace Placement Series prepares you for the toughest placement exams to top companies.
Test pattern consists of four subjects.
The paper having 100 marks.
-
C − 42 marks (each question carries 3 or 2 marks on objective and descriptive)
-
Data Structures-18 marks (only objective 2 or 3 marks)
-
Operating Systems-30 marks (it consists objective and descriptive, some problems on memory management)
-
Computer Networks-10 marks (both objective and descriptive) The following questions are given below:
-
what is output for the following program. #include <stdio. h> main () { int * p, * q, i; p = (int * ) 100; q = (int * ) 200; i = q-p; printf ( “%d” i); }
-
100
-
25
-
0
-
compile error
Ans: (b)
-
-
what is output for the following program. #include <stdio. h> #define swap (a, b) temp = a, a = b, b = temp; main () { int a = 5, b = 6; int temp; if (a>b) swap (a, b); printf ( “a = %d, b = %d” a, b); }
-
a = 5 b = 6
-
a = 6 b = 5
-
a = 0 b = 6
-
None
Ans: a a = 5 b = 6
-
-
what is output for the following program. #include <stdio. h> main () { unsigned char i; for (i = 0; i<300; i + + ) { printf ( “*” ); } }
-
299
-
300
-
infinite
-
none
ans: c (infinite)
-
-
what is output for the following program. #include <stdio. h> main () { int n = 2; int sum = 5; switch (n) { case 2: Sum = sum-2; case 3: Sum * = 5; break; default: Sum = 0; } printf ( “%d” sum); }
-
15
-
0
-
6
-
none
ans: a (15)
-
-
/* what is the program indicates */#include <stdio. h> main () { char * q; int * ip; q = (char * ) malloc (100); ip = (int * ) q; free (ip); }
-
it frees all allocated memory.
-
it frees 400 bytes of memory.
-
segmentation fault.
Ans: N/A
-
-
What is output for the following program. #include <stdio. h> main () { int a = 10, b = 5; if (a = a&b) b = ab; printf ( “a = %d, b = %d” a, b); }
-
a = 0, b = 5
-
a = 10 b = 5
-
a = 0, b = 0
-
none
Ans: a a = 0, b = 5
-
-
What is output for the following program. #include <stdio. h> main () { int a[5], i, * ip; for (i = 0; i<5; i + + ) a[i] = i; ip = a; printf ( “%d” * (ip + 3 * sizeof (int) ) ); }
-
0
-
5
-
1
-
none
Ans: d (none)
-
-
What is the size of the structure. #include <stdio. h> main () { struct { char a; short b; int c; }temp; }
-
7
-
8
-
12
-
120
ans: b
-
-
What is output for the following program. #include <stdio. h> main () { unsigned char c[] = { 0 × 1, 0 × 2, 0 × 3, 0 × 4, 0 × 11, 0 × 22, 0 × 33, 0 × 44}; unsigned int * p = c; unsigned short * s = c; printf ( “%x %x %x” c[2], p[2], s[2]); } Ans: Please execute this program.
-
What is the difference between these two declarations:
-
Define pointer to function that take argument as character pointer and return void pointer. Ans: Void * ( * f) (char * )
-
5 − 2 − 3 * 5 − 2 evaluates 18 then
-
-left associative * has precedence over-
-
-right associative * has precedence over-
-
* left associative-has precedence over *
-
* right associative-has precedence over *
-
Which is correct?
-
i
-
ii
-
iii
-
iv
Ans: (d)
-
DataStructure Questions
-
Difference between re-entrance and recursion.
-
In which datastructure recursion can be used. Ans: Stack.
-
Merge sort problem can be solved using which method. Ans: Divide and conquer strategy.
-
8 queens problem can be solved by using which method. Ans: Back tracking.
-
Two problems related to inorder and post order. First answer was: ± * a b c d (In objective its answer was (d) ) Second answer was: Inorder
Operating Systems
-
what are the necessary conditions for Deadlock refer Galvin Answer was: b&c
-
Two problems on memory management. One answer was: 68.5 ns (average access time.)
-
what are the different types of IPC mechanisms. Ans:
-
direct communication (messages).
-
Indirect communication (mail box).
-
Synchronous/Asynchronous communication (Naming.).
-
Context switching.
Ans: A
-
-
Specify any 3 regarding the context of process? Ans:
-
Process state.
-
Process Attribute.
-
Accounting Information.
-
See PCB (Process control Block) in Galvin Book.
-
Advantages and Disadvantages of cache buffer?
-
Increasing memory many page faults occur (I dont know Question exactly)?
Ans: FIFO
Computer Networks
-
What is the use of ICMP in TCP/IP stack?
-
What is the use of ARP in TCP/IP stack?
-
What is the header length of Ether Net MAC.
-
What is the mechanisms used for error detection in Data Link Layer?
-
Ans: CRC (cyclic redundency check.)