

MCQOPTIONS
Saved Bookmarks
This section includes 282 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the similarity between structure,union and enum? |
A. | all of them let you define new values |
B. | all of them let you define new pointers |
C. | all of them let you define new structure |
D. | all of them let you define new data types |
Answer» E. | |
2. |
What will be output if you will compile and execute the following c code? #include
|
A. | 5 |
B. | 6 |
C. | 7 |
Answer» E. | |
3. |
What is the number of swaps required to sort n elements using selection sort, in the worst case? |
A. | Θ(n) |
B. | Θ(n log n) |
C. | Θ(n2) |
D. | Θ(n2 log n) |
Answer» B. Θ(n log n) | |
4. |
The link list also contains a list pointer variable called start or ________. |
A. | name |
B. | field |
C. | node |
D. | link |
Answer» B. field | |
5. |
The memory address of fifth element of anarray can be calculated by the formula |
A. | LOC(Array[5])=Base(Array[5])+(5-lower boun(D), where w is the number of words per memory cell for the array |
B. | LOC(Array[5])=Base(Array[4])+(5-Upper boun(D), where w is the number of words per memory cell for the array |
C. | LOC(Array[5]=Base(Array)+w(5-lower bou |
D. | , where w is the number of words per memory cell for the array |
Answer» D. , where w is the number of words per memory cell for the array | |
6. |
If string 1 = John, and string 2 = Rivers are merged, the process is called ---- |
A. | insertion |
B. | deletion |
C. | concatenation |
D. | replacement |
Answer» D. replacement | |
7. |
When in order traversing a tree resulted E AC K F H D B G; the preorder traversal would return |
A. | FAEKCDBHG |
B. | FAEKCDHGB |
C. | EAFKHDCBG |
D. | FEAKDCHBG |
Answer» C. EAFKHDCBG | |
8. |
_________ is a search for data that uses an index to locate the item. |
A. | binary search |
B. | sequential search |
C. | indexed search |
D. | jump search |
Answer» D. jump search | |
9. |
_______ is a variable whose length may vary during the execution, but the length cannot exceed a maximum values defined before the program is executed. |
A. | dynamic |
B. | static |
C. | semi static |
D. | global |
Answer» D. global | |
10. |
_______ is a merge sort that sorts a data stream using repeated merges. |
A. | balanced |
B. | polyphase |
C. | radix |
D. | k-way |
Answer» E. | |
11. |
The following is two-way list |
A. | Grounded header list |
B. | Circular header list |
C. | Linked list with header and trailer nodes |
D. | None of above |
Answer» E. | |
12. |
The difference between linear array and a record is_____ |
A. | an array is suitable for homogeneous data but the data items in a record may have different data type |
B. | in a record,theremay not be a natural ordering in opposed ti linear array |
C. | a record form a hierarchical structure but a linear array does not |
D. | all of above |
Answer» E. | |
13. |
A node in a linked list must contain at least |
A. | three fields |
B. | two fields |
C. | four fields |
D. | one field |
Answer» C. four fields | |
14. |
In linked list,the logical order of elements |
A. | is same as their physical arrangement |
B. | is not necessarily equivalent to their physical arrangement |
C. | is determined by their physical arrangement |
D. | none of the above |
Answer» C. is determined by their physical arrangement | |
15. |
What will be the output of the program? #include
|
A. | hello |
B. | hi hello |
C. | no output |
D. | infinite loop |
Answer» B. hi hello | |
16. |
The main measures of efficiency of an algorithm are |
A. | processor and memory |
B. | complexity and capacity |
C. | time and space |
D. | data and space |
Answer» D. data and space | |
17. |
If two string are identical then strcmp() function returns____ |
A. | -1 |
B. | 1 |
C. | none of these |
Answer» D. | |
18. |
In a Heap tree values in a node is greater than |
A. | every value in left sub tree and smaller than right sub tree |
B. | every value in children of it |
C. | Both of above conditions are true |
D. | None of above conditions are true |
Answer» C. Both of above conditions are true | |
19. |
What will be output if you will compile and execute the following c code? #include
|
A. | 320 |
B. | 1 |
C. | 64 |
D. | none of the above |
Answer» D. none of the above | |
20. |
Two dimensional arrays are sometimes called _______ arrays. |
A. | integer |
B. | boolean |
C. | matrix |
D. | real |
Answer» D. real | |
21. |
Each data item in a record may be a groupitem composed of sub-items; those items which are indecomposable are called |
A. | Elementary items |
B. | Atoms |
C. | Scalars |
D. | All of above |
Answer» E. | |
22. |
What will be output if you will compile and execute the following c code?#include
|
A. | cquestionbank |
B. | cquestionbank\\0 |
C. | (null) |
D. | it will print nothing |
Answer» D. it will print nothing | |
23. |
Which of the following data structure is lin- ear data structure? |
A. | Trees |
B. | Graphs |
C. | Arrays |
D. | None of the above |
Answer» D. None of the above | |
24. |
You are asked to sort 15 randomly generated numbers. You should prefer |
A. | bubble sort |
B. | selection sort |
C. | insertion sort |
D. | merge sort |
Answer» B. selection sort | |
25. |
The number of comparisons required to sort 5 numbers in ascending order using bubble sort are |
A. | 7 |
B. | 6 |
C. | 10 |
D. | 5 |
Answer» D. 5 | |
26. |
The result of 0001 1010 ~ 0100 0011 is |
A. | 0101 1001 |
B. | 1010 0100 |
C. | 0000 0010 |
D. | none of these |
Answer» C. 0000 0010 | |
27. |
Which function returns a void pointers? |
A. | malloc returns integers pointer |
B. | calloc |
C. | both (a)and(b) |
D. | none of these |
Answer» D. none of these | |
28. |
The address returned by malloc()is type casted because |
A. | malloc returns integers pointer |
B. | malloc returns void pointer |
C. | malloc returns an integer value |
D. | none of these |
Answer» C. malloc returns an integer value | |
29. |
A ______ merge sort uses a constant number of input merge files and the same number of output merge files. |
A. | k-way |
B. | balanced |
C. | polyphase |
D. | radix |
Answer» C. polyphase | |
30. |
A variable P is called pointer if__ |
A. | p contains the address of an element in data |
B. | p points to the address of first element in data |
C. | p can store only memory address |
D. | p contain the data and the address of data |
Answer» B. p points to the address of first element in data | |
31. |
Because of linear structure of linked list having linear ordering,there is similarity between linked list and array in |
A. | insertion of a node |
B. | deletion of a node |
C. | traversal of elements of list |
D. | none of the above |
Answer» D. none of the above | |
32. |
What will be output if you will compile and execute the following c code? #include
|
A. | 2 |
B. | 4 |
C. | 8 |
D. | 10 |
Answer» D. 10 | |
33. |
Finding the location of the element with a given value is called |
A. | Traversal |
B. | Search |
C. | Sort |
D. | All of the above |
Answer» C. Sort | |
34. |
Queue is a -------------- List . |
A. | fifo |
B. | lifo |
C. | lilo |
D. | liso |
Answer» B. lifo | |
35. |
What is the maximun number of dimensions an array in C may have? |
A. | two |
B. | eight |
C. | twenty |
D. | theoratically no limit. the only practical limits are memory size and compilers |
Answer» E. | |
36. |
Elements of of an arrays are accessed by |
A. | accessing fuction in built in data structure |
B. | mathematical fuction |
C. | index |
D. | none of the above |
Answer» D. none of the above | |
37. |
Which of the following statements about linked list data structure is/are TRUE? |
A. | addition and deletion of an item to/ from the linked list require modification of the existing pointers |
B. | the linked list pointers do not provide an efficient way to search an item in the linked list |
C. | linked list pointers always maintain the list in ascending order |
D. | the linked list data structure provides an efficient way to find kth element in the list |
Answer» C. linked list pointers always maintain the list in ascending order | |
38. |
________ hashing method is used in combination with other methods. |
A. | subtraction |
B. | digit extraction |
C. | rotation |
D. | division |
Answer» D. division | |
39. |
The average case complexity of Insertion Sort is |
A. | o(2n) |
B. | o(n3) |
C. | o(n2) |
D. | o(2n) |
Answer» D. o(2n) | |
40. |
A sorting algorithm is stable if |
A. | its time complexity is constant irrespective of the nature of input |
B. | preserves the original order of records with equal keys |
C. | its space complexity is constant irrespective of the nature of input |
D. | it sorts any volume of data in a constant time |
Answer» C. its space complexity is constant irrespective of the nature of input | |
41. |
The result of 0001 1010^0001 0000 is____ |
A. | 0101 1001 |
B. | 1010 0100 |
C. | 0000 0010 |
D. | none of these |
Answer» D. none of these | |
42. |
In selection sort of n elements,how many times is the swp function called in the complete execution of the algorithm? |
A. | 1 |
B. | n-1 |
C. | n(n-1)/2 |
D. | none of these |
Answer» C. n(n-1)/2 | |
43. |
_______ is a field whose values uniquely determine the records in the file. |
A. | pointer |
B. | primary key |
C. | secondary key |
D. | function |
Answer» C. secondary key | |
44. |
_______ is a structure used to represent the linear relationship between elements by means of sequential memory locations. |
A. | linked list |
B. | array |
C. | pointer |
D. | stack |
Answer» C. pointer | |
45. |
How many times the program will print "Amrutvahini" ? #include
|
A. | infinite times |
B. | 32767 times |
C. | 65535 times |
D. | till stack overflows |
Answer» E. | |
46. |
Deletion of a node from an empty linked list will cause________ |
A. | underflow |
B. | overflow |
C. | run time error |
D. | all of the above |
Answer» B. overflow | |
47. |
One difference between a queue and a stack is: |
A. | queues require dynamic memory, but stacks do not. |
B. | stacks require dynamic memory, but queues do not |
C. | queues use two ends of the structure; stacks use only one. |
D. | stacks use two ends of the structure, queues use only one. |
Answer» D. stacks use two ends of the structure, queues use only one. | |
48. |
Select the correct looping condition for positioning apointer p on the second last in a linked list.Assume p=head,initially. |
A. | p->next->next!=null |
B. | p->next=null |
C. | p!=null |
D. | none of these |
Answer» B. p->next=null | |
49. |
Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked list |
A. | i and ii |
B. | i and iii |
C. | i,ii and iii |
D. | i,ii and iv |
Answer» C. i,ii and iii | |
50. |
Which of the following is more appropriate for reading a multi_word string? |
A. | printf |
B. | scanf |
C. | put |
D. | gets |
Answer» E. | |