Sei sulla pagina 1di 4

JECRC University, Jaipur

School of Engineering
III in Semester Examinations November 2016
MCA Semester V
Professionals Skill II
Paper code: MCA-044A
Time:1:30 hrs Maximum marks: 50
Instructions:
1. Answer all questions.
2. Write legibly on both sides of the answer book.
3. Write relevant question numbers before writing the answer.
Objective type questions: 1x50= 50 marks
return 0; A. Bubble sort c) sptr points to ptr2
} B. Insertion d) None of the
Q1. In C, if you pass sort mentioned
an array as an A. memfree(int p); C. Merge sort
argument to a B. D. Selection Q13. What is the
function, what dealloc(p); sort output of this C
actually gets passed? C. malloc(p, 0); Q10. What is the code?
A. Value of elements D. free(p); output of this C #include
in array code? <stdio.h>
B. First element of Q 5. Minimum #include void main()
the array number of moves <stdio.h> {
C. Base address of required to solve a int main() int a[3] = {1,
the array Tower of Hanoi { 2, 3};
D. Address of the puzzle is printf("before int *p = a;
last element of array A - 2n2 continue "); printf("%p\t
B - 2n-1 continue; %p", p, a);
n
Q2.The keyword C-2 1 printf("after }
used to transfer D - 2n - 1 continue\n"); a) Same address is
control from a } printed.
function back to the Q6. .. Is a) Before continue b) Different address
calling function is a pile in which items after continue is printed.
A. switch B. are added at one end b) Before continue c) Compile time
goto and removed from c) After continue error
C. go back D. the other. d) Compile time d) Nothing
return A) Stack error
B) Queue Q14. What is the
Q3.How many times C) List Q11. main() { output of this C
the program will D) None of Int a=3, code?
print " JECRCU " ? the above b=2, c*d*e; #include
#include<stdio.h> d=&a; <stdio.h>
int main() Q7. When new data e=&b; int main()
{ are to be inserted c=*d+*e; {
into a data structure, } const int
printf("JECRCU"); but there is not Which one ary[4] = {1, 2, 3, 4};
main(); available space; this of the given answers int *p;
return 0; situation is usually is correct? p = ary + 3;
} called.... A) a=4, c-6 B) *p = 5;
A. Underflow a=3, c=5
A. Infinite times B. overflow C) a=3, c=6 D) printf("%d\n",
B. 32767 C. houseful a=3, c=8 ary[3]);
times D. saturated
C. 65535 times Q12. Which of the }
D. Till stack Q8. Selection sort following option is a) 4
overflows first finds the .......... correct? b) 5
element in the list #include c) Compile time
Q4.How will you and put it in the first <stdio.h> error d) 3
free the memory position. int main()
allocated by the A. Middle element { Q 15. In binary heap,
following program? B. Largest int a = 1, b = whenever the root is
#include<stdio.h> element 2, c = 3; removed then the
#include<stdlib.h> C. Last element int *ptr1 = rightmost element of
#define MAXROW D. Smallest &a, *ptr2 = &b, last level is replaced
3 element *ptr3 = &c; by the root. Why?
#define MAXCOL 4 int **sptr = A - It is the easiest
int main() Q9. Which of the &ptr1; possible way.
{ following sorting *sptr = ptr2; B - To make sure that
int **p, i, j; algorithm is of } it is still complete
p = (int **) divide and conquer a) ptr1 points to a binary tree.
malloc(MAXROW * type? b) ptr1 points to b
sizeof(int*));
C - Because left and D - maximum value
right sub tree might is contained by the
be missing. root node.
D - None of the
above! Q 21. A queue data-
structure can be used
Q 16. Which of the for
following algorithm A - expression
does not divide the parsing
list B - recursion
A - linear search C - resource
B - binary allocation
search D - all of the above
C - merge sort
D - quick Q 22Heap is an
sort example of
A - complete binary
Q 17. For a binary tree
search algorithm to B - spanning tree
work, it is necessary C - sparse tree
that the array (list) D - binary search
must be tree
A sorted
B - unsorted Q 23. Queue data
C - in a heap structure works on
D - popped A LIFO B-
out of stack FIFO
C FILO D-
Q 18. Visiting root none of the above
node after visiting
left and right sub- Q24.Which of the
trees is called following is not
A - In-order logical operator?
Traversal B- A & B.
Pre-order Traversal &&
C - Post-order C. ||
Traversal D- D. !
None of the above
Q25. Which of the
Q19.Time required following cannot be
to merge two sorted checked in a switch-
lists of size m and n, case statement?
is A. Character
A - (m | n) B.Integer
B - (m + C. Float D.
n) enum
C - (m log n)
D - (n log
m)

Q20. In a min heap


A - minimum values
are stored.
B - child nodes have
less value than
parent nodes.
C - parent nodes
have less value than
child nodes.

Potrebbero piacerti anche