92% found this document useful (24 votes)
25K views32 pages

Design & Analysis of Algorithms - 88 MCQs With Answers - Part 1 - Department of Computer Engineers PDF

Uploaded by

Harshaldhepe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
92% found this document useful (24 votes)
25K views32 pages

Design & Analysis of Algorithms - 88 MCQs With Answers - Part 1 - Department of Computer Engineers PDF

Uploaded by

Harshaldhepe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

DON'T MISS Loading...

More you share, more you have!!!

 PRACTICE C PRACTICE C++ COLLEGE ASSIGNMENTS

Home  Algorithms question and answers  aptitude questions  daa mcq with answers  multiple


choice questions in algorithms with answers  Slider  technical aptitude  Design & Analysis of

Design & Analysis of Algorithms - 88 MCQs


with answers - Part 1
 Algorithms question and answers , aptitude questions , daa mcq with answers ,
multiple choice questions in algorithms with answers , Slider , technical aptitude

Multiple Choice Questions in
Design and Analysis of Algorithms with Answers
1. There are ______steps to solve the problem
A. Seven

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 1/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

B. Four
C. Six
D. Two
Answer: ­ C
2. ______is the first step in solving the problem
A. Understanding the Problem
B. Identify the Problem
C. Evaluate the Solution
D. None of these
Answer: ­ B
3. ______is the last step in solving the problem
A. Understanding the Problem
B. Identify the Problem
C. Evaluate the Solution
D. None of these
Answer: ­ C
4. Following is true for understanding of a problem
A. Knowing the knowledgebase
B. Understanding the subject on which the problem is based
C. Communication with the client
D. All of the above
Answer: ­ D
5. The six­step solution for the problem can be applied to
I. Problems with Algorithmic Solution
II. Problems with Heuristic Solution
A. Only I
B. Only II
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 2/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

C. Both I and II
D. Neither I nor II
Answer: ­ C
6. ______ solution requires reasoning built on knowledge and
experience
A. Algorithmic Solution
B. Heuristic Solution
C. Random Solution
D. None of these
Answer: ­ B
7. While solving the problem with computer the most difficult
step is __________.
A. describing the problem
B. finding out the cost of the software
C. writing the computer instructions
D. testing the solution
Answer:­ C
8. The correctness and appropriateness of
___________solution can be checked very easily.
A. algorithmic solution
B. heuristic solution
C. random solution
D. none of these
Answer:­ A
9. The branch of computer that deals with heuristic types of
problem is called _________________.
A. system software
B. real time software
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 3/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

C. artificial intelligence
D. none of these
Answer:­ C
10. Artificial Intelligence makes use of following prominently
A. Database
B. Data Warehouse
C. Knowledge base
D. None of these
Answer:­C
11. Naming convention for variable is followed in company
because ____________.
A. it enhances readability
B. it allows to work without conflicts
C. it enhances the efficiency
D. all of the above
Answer:­ D
12. The true and false values represent __________.
A. logical data
B. numeric data
C. character data
D. alphanumeric data
Answer:­ A
13. Following operator distinguishes equation from expression
A. +, ­, *, /
B. < or >
C. Logical operators
D. Assignment Operator
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 4/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

Answer:­ D
14. Following are called logical operators
A. +, ­, *, /
B. <, >, <=, >=
C. AND, OR, NOT
D. \, MOD
Answer:­ C
15. The hierarchy of operations is denoted as _____________.
I. +, ­
II. Power
III. *, /
IV. \, MOD
A. I, II, III, IV
B. II, IV, III, I
C. IV, I, III, II
D. II, III, IV, I
Answer:­ B
16. The hierarchy of operations is denoted as _____________.
I. +, ­
II. Power
III. *, /
IV. \, MOD
A. I, II, III, IV
B. II, IV, III, I
C. IV, I, III, II
D. II, III, IV, I
Answer:­ B
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 5/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

17. Evaluate 5*(x+y)­4*y/(z+6) where x = 2, y = 3, and z = 6
A. 1
B. 24
C. 5
D. 10
Answer:­ B
18. Evaluate a­2>b where a=6, b = 8
A. False
B. True
C. 6
D. 7
Answer:­A
19. Evaluate for a = 5, b = 4, c = 3, d = 12 for the equation E =
a*b+d/c
A. 40
B. 24
C. 10
D. 10.66
Answer:­B
20. Evaluate for the equation e = 5*a\d*(b+1) where a = 5, b = 4,
c = 3, d = 12
A. 10
B. 24
C. 0
D. 10
Answer:­ C
21. Evaluate for the following A = TRUE, B = FALSE, C =
FALSE
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 6/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

i. R = NOT ( A OR B ) AND NOT (B OR C)
ii. R = B AND NOT ( A OR C ) OR NOT (B AND C)
A. i is true and ii is true
B. i is true and ii is false
C. i is false and ii is true
D. i is false and ii is false
Answer:­ C
22. An employee came in to work and clocked in at MorningIn,
clocked out at NoonOut1 for lunch, clocked back in at NoonIn,
and clocked out to home at NoonOut2. Set up equation to
calculate the number of hours worked for the day.
A. WorkingHrs = (12 ­ (MorningIn+NoonOut1) + (NoonOut2­
NoonIn))
B. WorkingHrs = (12 – MorningIn + (NoonOut1­12.00) +
(NoonOut2­NoonIn))
C. WorkingHrs = (12 – MorningIn) + (NoonOut1­12.00)­
(NoonOut2­NoonIn))
D. WorkingHrs = (MorningIn+NoonIn) + (12.00­NoonOut2)
Answer:­ B
23. A large department store has its own charge card. The
policy for a customer to charge an item is that the customer
must have a valid charge card and either a balance of less
than Rs.500 or a charge of less than Rs.50.
A. ChargeCard AND (Balance < 500 OR Amount < 50)
B. ChargeCard OR (Balance < 500 AND Amount < 50)
C. ChargeCard OR (Balance < 500 OR Amount < 50)
D. ChargeCard AND (Balance < 500 AND Amount < 50)
Answer:­ A
24. Consider the use of PAC for obtaining the solution for
converting distance in Miles to Kilometers. The use of formula

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 7/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

“Kilometers = 1.609* Miles” will be in 
A. given data section
B. required result section
C. processing required section
D. solution alternative section
Answer:­ C
25. The PAC stands for
A. Program Analysis Chart
B. Problem Algorithm Code
C. Problem Access Code
D. Problem Analysis Chart
Answer:­ D
26. In interactivity chart the darkened circle indicates
_______________.
A. duplicate module
B. loop
C. decision
D. no special meaning
Answer:­ B
27. In interactivity chart the diamond indicates
_______________.
A. duplicate module
B. loop
C. decision
D. no special meaning
Answer:­ C
28. The interactivity chart is also known as
__________________.
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 8/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

A. IPO Chart
B. Problem Analysis Chart
C. flow chart
D. structure chart
Answer:­ D
29. The IPO stands for
A. Input Programming Option
B. Input Programming Output
C. Input Processing Output
D. Input Operating Operation
Answer:­ C
30. The difference between /, \ and MOD operator is
A. \ Integer Division, / Division and MOD Modulo Division
B. / Division, \ escape sequence, MOD remainder
C. / Division, \ not an operator, MOD is module
D. \ Division /Integer Division, MOD is Modulo Division
Answer:­ A
31. The help menus or user manuals are the part of
______________.
A. Program
B. Algorithm
C. Internal Documentation
D. External Documentation
Answer:­ D
32. The main measure for efficiency algorithm are­
A. Processor and Memory
B. Complexity and Capacity
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 9/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

C. Data and Space
D. Time and space
Answer:­ D
33. What does the algorithmic analysis count?
A. The number of arithmetic and the operations that are
required to run the program
B. The number of lines required by the program
C. The number of seconds required by the program to execute
D. None of these
Answer:­ A
34. Examples of O(1) algorithms are______________.
A. Multiplying two numbers.
B. assigning some value to a variable
C. displaying some integer on console
D. All of the above
Answer:­ D
35. Examples of O(n2) algorithms are______________.
A. Adding of two Matrices
B. Initializing all elements of matrix by zero
C. Both A and B
D. Neither A nor B
Answer:­ C
36. The complexity of three algorithms is given as: O(n), O(n2)
and O(n3). Which should execute slowest for large value of n?
A. O(n)
B. O(n2)
C. O(n3)

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 10/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

D. All will execute in same time.
Answer:­
37. There are four algorithms A1, A2, A3, A4 to solve the given
problem with the order log(n), nlog(n), log(log(n))n/log(n),
Which is the best algorithm.
A. A1
B. A2
C. A3
D. A4
Answer:­ C
38. Express the formula (n­1)*(n­5) in terms of big Oh notation
A. O(1)
B. O(log n)
C. O(n)
D. O(n2)
Answer:­ D
39. The time complexity of binary search is________.
A. O(1)
B. O(log n)
C. O(n)
D. O(n logn)
Answer:­ B
40. The time complexity of linear search is________.
A. O(1)
B. O(log n)
C. O(n)
D. O(n logn)

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 11/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

Answer:­ C
41. In quick sort, the number of partitions into which the file of
size n is divided by a selected record is
a. n
b. n ­ 1
c. 2
d. n/2
Answer:­ C
42. A sort technique is said to be stable when the original
relative order of records with equal keys are retained after
sorting.
A. True
B. False
Answer:­ A
43. The three factors contributing to the sort efficiency
considerations are the efficiency in coding, machine run time
and the space requirement for running the procedure.
A. True
B. False
Answer:­ A
44. How many passes are required to sort a file of size n by
bubble sort method?
A. N2
B. N
C. N­1
D. N/2
Answer:­ C
45. How many number of comparisons are required in
insertion sort to sort a file if the file is sorted in reverse order?

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 12/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

A. N2
B. N
C. N­1
D. N/2
Answer:­ A
46. How many number of comparisons are required in
insertion sort to sort a file if the file is already sorted?
A. N2
B. N
C. N­1
D. N/2
Answer:­ C
47. The worst­case time complexity of Quick Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
Answer:­ A
47. The worst­case time complexity of Bubble Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
Answer:­ A
48. The worst­case time complexity of Selection Exchange
Sort is________.
A. O(n2)

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 13/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

B. O(log n)
C. O(n)
D. O(n logn)
Answer:­ A
49. The worst­case time complexity of Merge Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
Answer:­ D
50. The algorithm like Quick sort does not require extra
memory for carrying out the sorting procedure. This technique
is called __________.
A. in­place
B. stable
C. unstable
D. in­partition
Answer:­ A
51. Which of the following sorting procedures is the slowest?
A. Quick sort
B. Heap sort
C. Shell sort
D. Bubble sort
Answer:­ D
52. Two main measures for the efficiency of an algorithm are
A. Processor and memory
B. Complexity and capacity

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 14/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

C. Time and space
D. Data and space
Answer:­ C
53. The space factor when determining the efficiency of
algorithm is measured by
A. Counting the maximum memory needed by the algorithm
B. Counting the minimum memory needed by the algorithm
C. Counting the average memory needed by the algorithm
D. Counting the maximum disk space needed by the algorithm
Answer:­ A
54. The time factor when determining the efficiency of
algorithm is measured by
A. Counting microseconds
B. Counting the number of key operations
C. Counting the number of statements
D. Counting the kilobytes of algorithm
Answer:­ B
55. A list of n strings, each of length n, is sorted into
lexicographic order using the merge­sort algorithm. The worst
case running time of this computation is
A. O (n log n)
B. O (n2 log n)
C. O (n2 + log n)
D. O (n2)
Answer:­ A
56. Which of the following case does not exist in complexity
theory?
A. Best case

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 15/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

B. Worst case
C. Average case
D. Null case
Answer:­ D
57. The concept of order Big O is important because
A. It can be used to decide the best algorithm that solves a
given problem
B. It determines the maximum size of a problem that can be
solved in a given amount of time
C. It is the lower bound of the growth rate of algorithm
D. Both A and B
Answer:­ A
58. The recurrence relation capturing the optimal execution
time of the Towers of Hanoi problem with n discs is
A. T(n) = 2T(n ­ 2) + 2
B. T(n) = 2T(n ­ 1) + n
C. T(n) = 2T(n/2) + 1
D. T(n) = 2T(n ­ 1) + 1
Answer:­ D
59. Which of the following sorting methods would be most
suitable for sorting a list which is almost sorted?
A. Bubble Sort
B. Insertion Sort
C. Selection Sort
D. Quick Sort
Answer: ­ B.
60. Suppose we are sorting an array of eight integers using
some quadratic sorting algorithm. After four iterations of the
algorithm’s main loop, the array elements are ordered as
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 16/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

shown here:
2 4 5 7 8 1 3 6
A. Insertion sort
B. Selection sort
C. Either of a and b
D. None of the above
Answer: ­ A.
61. The running time of insertion sort is
A. O(n^2)
B. O(n)
C. O(log n)
D. O(n log n)
Answer: ­ A.
62. A sort which compares adjacent elements in a list and
switches where necessary is ____.
A. insertion sort
B. heap sort
C. quick sort
D. bubble sort
Answer: ­ A.
63. The correct order of the efficiency of the following sorting
algorithms according to their overall running time comparison
is
A. Insertion>selection>bubble
B. Insertion>bubble>selection
C. Selection>bubble>insertion.
D. bubble>selection>insertion
Answer: ­ D.
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 17/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

64. A sort which iteratively passes through a list to exchange
the first element with any element less than it and then repeats
with a new first element is called
A. insertion sort
B. selection sort
C. heap sort
D. quick sort
Answer: ­ A.
65. The number of swapping’s needed to sort the numbers 8,
22, 7, 9, 31, 19, 5, 13 in ascending order, using bubble sort is
A. 10
B. 9
C. 13
D. 14
66. The way a card game player arranges his cards as he picks
them one by one can be compared to
A. Quick sort
B. Merge sort
C. Insertion sort
D. Bubble sort
Answer: C
67. Which among the following is the best when the list is
already sorted?
A. Insertion sort
B. Bubble sort
C. Merge sort
D. Selection sort
Answer: A

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 18/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

68. As part of the maintenance work, you are entrusted with
the work of rearranging the library books in a shelf in proper
order, at the end of each day. The ideal choice will be
A. Bubble sort
B. Insertion sort
C. Selection sort
D. Merge sort
Answer : B
69. In quick sort, the number of partitions into which the file of
size n is divided by a selected record is
A. n
B. n ­ 1
C. 2
D. None of the above
Answer:­ C.
70. The total number of comparisons made in quick sort for
sorting a file of size n, is
A. O(n log n)
B. O(n2)
C. n(log n)
D. None of the above
Answer:­ A.
71. Quick sort efficiency can be improved by adopting
A. non­recursive method
B. insertion method
C. tree search method
D. None of the above
Answer:­ A.
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 19/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

72. For the improvement of efficiency of quick sort the pivot
can be
A. the first element
B. the mean element
C. the last element
D. None of the above
Answer:­ B.
73. Quick sort is the fastest available method of sorting
because of
A. low over head
B. O(n log n) comparisons
C. low overhead and also O(n log n) comparisons
D. None of the above
Answer:­ C
74. Straight selection sort is basically a method of repeated
A. interchange
B. searching
C. position adjustment
D. None of the above
Answer:­ C
75. Number of selections required to sort a file of size N by
straight selection requires
A. N ­ 1
B. log N
C. O(N2)
D. None of the above
Answer:­ A
76. For sorting a file of size n by straight selection sort, the
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 20/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

number of comparisons made in the first pass is
A. n
B. n ­ 1
C. n(n ­ 1)/2
D. None of the above
Answer:­ B.
77. Heap is defined to be a
A. complete binary tree
B. binary tree
C. tree structure
D. None of the above
Answer:­ A.
78. In a Max heap the largest key is at
A. the root
B. a leaf
C. a node
D. None of the above
Answer:­ A.
79. In heap sort the input is arranged in the form of a
A. heap
B. tree
C. queue
D. None of the above
Answer:­ A.
80. Heap sort is found to be very efficient
A. with regard to storage requirement
B. in time consumption
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 21/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

C. regarding overheads involved
D. None of the above
Answer:­ A.
81. Suppose we need to sort a list of employee records in
ascending order, using the social security number (a 9­digit
number) as the key (i.e., sort the records by social security
number). If we need to guarantee that the running time will be
no worse than n log n, which sorting methods could we use?
A. mergesort
B. quicksort
C. insertion sort
D. Either mergesort or quicksort
E. None of these sorting algorithms guarantee a worst­case
performance of n log n or better
Answer:­ A.
82. Consider the following function f:
int f(int n)
{
int s = 0;
while(n > 1)
{
n = n/2;
s++;
}
return s;
}
What is the asymptotic complexity in terms of n? (Pick the
smallest correct answer)
A. O(nlog n)
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 22/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

B. O(n)
C. O( n)
D. O(log n)
E. O(n^2 )
Answer:­ D.
83. The most important reason for including a destructor in a
class is:
A. To print a message for debugging purposes
B. To store information about an object before it goes out of
scope
C. To free up resources allocated by that class
D. To reset the original object’s pointer to NULL
E. To make your TA happy
Answer:­ C.
84. One of these code fragments calls the copy constructor for
class A. Which one? (Assume that doSomething is a void
function with a parameter of the appropriate type.)
A. A a;
B b;
a = b;
B. A array[20];
C. A a;
doSomething(a);
D. A* a;
doSomething(a)
E. A a;
doSomething(&a);
Answer:­ C.
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 23/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

85. What is the asymptotic runtime for traversing all nodes in a
binary search tree with n nodes and printing them in order?
A. O(n ⋅ log(n))
B. O(n)
C. O( n)
D. O(log(n))
E. O(n^2 )
Answer:­ B.
86. Consider a class List that implements an unordered list.
Suppose it has as its representation a dynamically expanding
(resizable) array. Which of these operations might need to
delete some dynamically allocated storage to avoid a memory
leak?
I. Default Constructor
II. Copy Constructor
III. Destructor
IV. Assignment operator
A. I and II
B. II and III
C. II and IV
D. III and IV
E. II, III, and IV
Answer:­ D.
87. What is the postfix representation of this expression?
(12 – a) * (b + 9) / (d * 4)
A. 4 b * d 9 + a 12 ­ * /
B. / 12 a – b 9 + d 4 *
C. 12 – a * b + 9 / d * 4

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 24/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

D. 12 a – b 9 + * d 4 * /
E. None of the above
Answer:­ D.
88. Assuming that the hash function for a table works well, and
the size of the hash table is reasonably large compared to the
number of items in the table, the expected (average) time
needed to find an item in a hash table containing n items is
A. O(1)
B. O(log n)
C. O(nlog n)
D. O(n)
E. O( n) 
Answer:­ A.

Share on Facebook Share on Twitter Share on Google Plus

RELATED POSTS

Port Scanner Program in Java How to perform unit testing Sample quality control
with Ju... checklist fo...

 BLOGGER COMMENT  FACEBOOK COMMENT

3 comments:

UNKNOWN SEPTEMBER 13, 2019 AT 11:05 AM

So nice

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 25/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

Reply

UNKNOWN SEPTEMBER 13, 2019 AT 11:05 AM

So nice

Reply

CHARU DECEMBER 20, 2019 AT 6:02 AM

helped a lot. Thank you

Reply

Enter your comment...

Comment as:  [email protected] (Google) Sign out

 
Publish Preview   Notify me

Links to this post

Create a Link

Home Older Post

Popular Video Category

Post
Design
&

Analysis of Algorithms ­
88 MCQs with answers ­
Part 1
Multiple Choice Questions in
Design and Analysis of
Algorithms with Answers 1.
There are ______steps to
solve the problem ...

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 26/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

LEX

program to count the
number of characters,
words, spaces and lines
Q.Write a program using LEX
to count the number of
characters, words, spaces and
lines in a given input file.
Source Code­>...

LEX

program to recognize
and count number of
identifiers in a input file
Q.Write a program using LEX
to recognize and count the
number of identifiers in a given
input file. Source Code:­> %{...

LEX

program to count the
numbers of comment
lines in a given C
program
Q.Write a LEX  program to
count the numbers of
comment lines in a given C
program. Also eliminate them
and copy the resulting
progra...

LEX

program to recognize a
valid arithmetic
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 27/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

expression
Q.Write a program using LEX
to recognize a valid arithmetic
expression and to recognize
the identifiers and operators
present....

LEX

program to recognize
whether a given
sentence is simple or
compound.
Q.Write a program using LEX
to recognize whether a given
sentence is simple or
compound. Source Code­>  %
{ int flag...

program for interprocess
communication using
pipe system call
Question: Write an
interprocess communication
program using unnamed pipe.
Process A accepts a character
string and Process B inver...

program to create a child
process by fork() and
print getpid() & getppid()
Q. Write a C program to do the
following: Using fork( ) create
a child process. The child
process prints its own
process­id ...

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 28/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

Find
out IP

address of remotely
located machine/system
in Java environment
Q.Write a program to find out
ip address of remote
computer. Source Code:­>
import java.net.*; class Inet1
{...

YACC

program that accepts a
regular expression as
input and produce its
parse tree as output
Q. Write a yacc program that
accepts a regular expression
as input and produce its parse
tree as output. Source Code:­
>...

FEATURED VIDEO

Slider

ADVERTISEMENT

FIND US ON FACEBOOK

POPULAR POSTS LABELS FEATURED VIDEO

Design & Slider lex program


Analysis of
Algorithms ­ college assignments
88 MCQs
with answers ­ Part 1 compiler design lab
Multiple Choice Questions in

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 29/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

Design and Analysis of
c aptitude questions
Algorithms with Answers 1.
There are ______steps to solve
the problem ...
lex program tutorial

LEX c practice questions
program to
count the c programming
number of
characters, words, java programming
spaces and lines
Q.Write a program using LEX to operating system lab
count the number of characters,
words, spaces and lines in a programming lab
given input file. Source Code­
>... Network programming

LEX c tricky questions
program to
recognize quality assurance
and count
number of identifiers software testing lab
in a input file
Q.Write a program using LEX to
Algorithms  question  and
recognize and count the number answers
of identifiers in a given input file.
Source Code:­> %{... DLL in visual basic

LEX Frequently  asked  C


program to programs
count the
numbers of ME  computer  network
comment lines in a subject
given C program
Q.Write a LEX  program to count
Network  programming
lab
the numbers of comment lines in
a given C program. Also
Network  programming
eliminate them and copy the question papers
resulting progra...
Network  programming
LEX questions
program to
recognize Visual  Basic
whether a Assignments
given sentence is
simple or compound. addition  without  plus
operator
Q.Write a program using LEX to
recognize whether a given
aptitude questions
sentence is simple or
compound. Source Code­>  %{
c interview questions
int flag...

c program factorial
LEX
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 30/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers

program to c  program  for


recognize a interprocess
communication  using
valid pipes
arithmetic
expression c  program  for  knapsack
Q.Write a program using LEX to
with greedy
recognize a valid arithmetic
expression and to recognize the c  program  for  nqueen
puzzle
identifiers and operators
present....
c  programming  pipe
buffer to program
C program
to create a create child process
child
process by daa mcq with answers
fork() and print
getpid() & getppid() factorial  of  number  c
Q. Write a C program to do the program
following: Using fork( ) create a
child process. The child process fork function
prints its own process­id ...
infinity loop in c programs
C program
for inter  process
communication c

interprocess ipc using pipes in c
communication using
pipe system call
java inetaddress class
Question: Write an interprocess
communication program using
junit library
unnamed pipe. Process A
accepts a character string and
Process B inver...
knapsack algorithm

Find out IP lex  program  to  count


comments
address of
remotely main within main function
located
machine/system in
multiple choice questions
Java environment in  algorithms  with
Q.Write a program to find out ip answers
address of remote computer.
Source Code:­> import network  and  information
security
java.net.*; class Inet1 {...

palindrome program
C program
to
implement palindrome  program  in  c
language
knapsack
algorithm using palindrome  program  in  c
greedy approach using for loop
Q.Write a C program for
palindrome  string
http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 31/32
1/21/2020 Design & Analysis of Algorithms - 88 MCQs with answers - Part 1 | Department of Computer Engineers
palindrome  string
knapsack algorithm using program in c
greedy approach Source Code:­
> #include<stdio.h> #include<... port scanner in java

shell programming

shell script

socket programming

technical aptitude

unipune  network
programming subject

yacc program

yacc program tutorial

Copyright © 2015 Department of Computer Engineers Blogger Templates
Created By Sora Templates and My Blogger Themes

http://departmentofcomputerengineers.blogspot.com/2015/02/design-analysis-of-algorithms-best-mcqs.html 32/32

You might also like