MCQOPTIONS
Saved Bookmarks
This section includes 46 Mcqs, each offering curated multiple-choice questions to sharpen your Bachelor of Sc in Computer Science FY knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
A. Halt execution of program |
| A. | b. restart execution |
| B. | f program |
| C. | exit from loop or switch statement |
| D. | none of the avobe |
| Answer» D. none of the avobe | |
| 2. |
A. Constant |
| A. | b. |
| B. | ariable |
| C. | special symbol |
| D. | none of the avobe |
| Answer» B. ariable | |
| 3. |
A. int constant var =10; |
| A. | b. int |
| B. | onst var = 10; |
| C. | const int var = 10; |
| D. | b & c both |
| Answer» E. | |
| 4. |
B. Constants have fixed values that change during the execution |
| A. | of a program |
| B. | . constants have unknown values that may be change during the execution |
| C. | of a program |
| D. | none of the above |
| Answer» B. . constants have unknown values that may be change during the execution | |
| 5. |
B. Keywords have some unknown meanings and these meanings cannot be |
| A. | changed. |
| B. | . keywords have some predefine meanings and these meanings cannot be |
| C. | hanged. |
| D. | none of the above |
| Answer» D. none of the above | |
| 6. |
A. The smallest individual units of c program |
| A. | b. the basic element |
| B. | ecognized by the compiler |
| C. | the largest individual units of program |
| D. | a & b both |
| Answer» E. | |
| 7. |
A. double and chars |
| A. | b. floats and doubles |
| B. | . ints |
| C. | and floats |
| D. | ints and chars |
| Answer» E. | |
| 8. |
printf("%d%d", book.price, book.page); |
| A. | b. printf("%d%d", price.book, page.book); |
| B. | . |
| C. | printf("%d%d", price::book, page::book); |
| D. | printf("%d%d", price->book, page->book); |
| Answer» B. . | |
| 9. |
Which is the correct syntax to declare constant pointer? |
| A. | int *const constptr; |
| B. | *int constant constptr; |
| C. | const int *constptr; |
| D. | a and c both |
| Answer» E. | |
| 10. |
In which linked list last node address is null? |
| A. | doubly linked list |
| B. | circular list |
| C. | singly linked list |
| D. | none of the above |
| Answer» D. none of the above | |
| 11. |
What is Dequeue? |
| A. | elements can be added from front |
| B. | elements can be added to or removed from either the front or rear |
| C. | elements can be added from rear |
| D. | none of the above |
| Answer» C. elements can be added from rear | |
| 12. |
The Default Parameter Passing Mechanism is called as |
| A. | call by value |
| B. | call by reference |
| C. | call by address |
| D. | call by name |
| Answer» B. call by reference | |
| 13. |
C is ______ Language? |
| A. | low level |
| B. | high level |
| C. | assembly level |
| D. | machine level |
| Answer» B. high level | |
| 14. |
In which tree, for every node the height of its left subtree and right subtree differ almost by one? |
| A. | binary search tree |
| B. | avl tree |
| C. | threaded binary tree |
| D. | complete binary tree |
| Answer» C. threaded binary tree | |
| 15. |
The worst case time complexity of AVL tree is better in comparison to binary search tree for |
| A. | search and insert operations |
| B. | search and delete operations |
| C. | insert and delete operations |
| D. | search, insert and delete operations |
| Answer» E. | |
| 16. |
The "C" language is |
| A. | context free language |
| B. | context sensitive language |
| C. | regular language |
| D. | none of the above |
| Answer» B. context sensitive language | |
| 17. |
Number of binary trees formed with 5 nodes are |
| A. | 30 |
| B. | 36 |
| C. | 108 |
| D. | 42 |
| Answer» E. | |
| 18. |
The _______ memory allocation function modifies the previous allocated space. |
| A. | calloc |
| B. | free |
| C. | malloc |
| D. | realloc |
| Answer» E. | |
| 19. |
The statement printf("%c", 100); will print? |
| A. | prints 100 |
| B. | print garbage |
| C. | prints ascii equivalent of 100 |
| D. | none of the above |
| Answer» D. none of the above | |
| 20. |
The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print? |
| A. | 10 |
| B. | 0 |
| C. | 12 |
| D. | 1 |
| Answer» E. | |
| 21. |
Queue is a _____________ list. |
| A. | lifo |
| B. | lilo |
| C. | filo |
| D. | fifo |
| Answer» E. | |
| 22. |
Recursive functions are executed in a? |
| A. | first in first out order |
| B. | load balancing |
| C. | parallel fashion |
| D. | last in first out order |
| Answer» E. | |
| 23. |
Which one of the following is not a linear data structure? |
| A. | array |
| B. | binary tree |
| C. | queue |
| D. | stack |
| Answer» C. queue | |
| 24. |
A binary tree with 27 nodes has _______ null branches. |
| A. | 54 |
| B. | 27 |
| C. | 26 |
| D. | none of the above |
| Answer» E. | |
| 25. |
Which one of the following sentences is true ? |
| A. | the body of a while loop is executed at least once. |
| B. | the body of a do ... while loop is executed at least once. |
| C. | the body of a do ... while loop is executed zero or more times. |
| D. | a for loop can never be used in place of a while loop. |
| Answer» C. the body of a do ... while loop is executed zero or more times. | |
| 26. |
What is function? |
| A. | function is a block of statements that perform some specific task. |
| B. | function is the fundamental modular unit. a function is usually designed to perform a specific task. |
| C. | function is a block of code that performs a specific task. it has a name and it is reusable |
| D. | all the above |
| Answer» E. | |
| 27. |
What is the work of break keyword? |
| A. | halt execution of program |
| B. | restart execution of program |
| C. | exit from loop or switch statement |
| D. | none of the above |
| Answer» D. none of the above | |
| 28. |
In switch statement, each case instance value must be _______? |
| A. | constant |
| B. | variable |
| C. | special symbol |
| D. | none of the above |
| Answer» B. variable | |
| 29. |
Which operators are known as Ternary Operator? |
| A. | ::, ? |
| B. | ?, : |
| C. | ?, ;; |
| D. | none of the above |
| Answer» C. ?, ;; | |
| 30. |
Which is the right way to declare constant in C? |
| A. | int constant var =10; |
| B. | int const var = 10; |
| C. | const int var = 10; |
| D. | b & c both |
| Answer» E. | |
| 31. |
What is constant? |
| A. | constants have fixed values that do not change during the execution of a program |
| B. | constants have fixed values that change during the execution of a program |
| C. | constants have unknown values that may be change during the execution of a program |
| D. | none of the above |
| Answer» B. constants have fixed values that change during the execution of a program | |
| 32. |
What is Keywords? |
| A. | keywords have some predefine meanings and these meanings can be changed. |
| B. | keywords have some unknown meanings and these meanings cannot be changed. |
| C. | keywords have some predefine meanings and these meanings cannot be changed. |
| D. | none of the above |
| Answer» D. none of the above | |
| 33. |
What is C Tokens? |
| A. | the smallest individual units of c program |
| B. | the basic element recognized by the compiler |
| C. | the largest individual units of program |
| D. | a & b both |
| Answer» E. | |
| 34. |
Bitwise operators can operate upon? |
| A. | double and chars |
| B. | floats and doubles |
| C. | ints and floats |
| D. | ints and chars |
| Answer» E. | |
| 35. |
perror( ) function used to ? |
| A. | work same as printf() |
| B. | prints the error message specified by the compiler |
| C. | prints the garbage value assigned by the compiler |
| D. | none of the above |
| Answer» C. prints the garbage value assigned by the compiler | |
| 36. |
What is the right way to access value of structure variable book{ price, page }? |
| A. | printf("%d%d", book.price, book.page); |
| B. | printf("%d%d", price.book, page.book); |
| C. | printf("%d%d", price::book, page::book); |
| D. | printf("%d%d", price->book, page->book); |
| Answer» B. printf("%d%d", price.book, page.book); | |
| 37. |
An array elements are always stored in _________ memory locations. |
| A. | sequential |
| B. | random |
| C. | sequential and random |
| D. | none of the above |
| Answer» B. random | |
| 38. |
What is right way to Initialization array? |
| A. | int num[6] = { 2, 4, 12, 5, 45, 5 } ; |
| B. | int n{} = { 2, 4, 12, 5, 45, 5 } ; |
| C. | int n{6} = { 2, 4, 12 } ; |
| D. | int n(6) = { 2, 4, 12, 5, 45, 5 } ; |
| Answer» B. int n{} = { 2, 4, 12, 5, 45, 5 } ; | |
| 39. |
What is an array? |
| A. | an array is a collection of variables that are of the dissimilar data type. |
| B. | an array is a collection of variables that are of the same data type. |
| C. | an array is not a collection of variables that are of the same data type. |
| D. | none of the above. |
| Answer» C. an array is not a collection of variables that are of the same data type. | |
| 40. |
Which of the following shows the correct hierarchy of arithmetic operations in C |
| A. | / + * - |
| B. | * - / + |
| C. | + - / * |
| D. | * / + - |
| Answer» E. | |
| 41. |
Which of the following is allowed in a C Arithmetic instruction |
| A. | [] |
| B. | {} |
| C. | () |
| D. | none of the above |
| Answer» D. none of the above | |
| 42. |
A C variable cannot start with |
| A. | an alphabet |
| B. | a number |
| C. | a special symbol other than underscore |
| D. | both (b) and (c) |
| Answer» E. | |
| 43. |
C programs are converted into machine language with the help of |
| A. | an editor |
| B. | a compiler |
| C. | an operating system |
| D. | none of the above |
| Answer» C. an operating system | |
| 44. |
For 16-bit compiler allowable range for integer constants is ______ ? |
| A. | -3.4e38 to 3.4e38 |
| B. | -32767 to 32768 |
| C. | -32768 to 32767 |
| D. | -32668 to 32667 |
| Answer» D. -32668 to 32667 | |
| 45. |
C Language developed at _____? |
| A. | at & t\s bell laboratories of usa in 1972 |
| B. | at & t\s bell laboratories of usa in 1970 |
| C. | sun microsystems in 1973 |
| D. | cambridge university in 1972 |
| Answer» B. at & t\s bell laboratories of usa in 1970 | |
| 46. |
Who is father of C Language? |
| A. | bjarne stroustrup |
| B. | dennis ritchie |
| C. | james a. gosling |
| D. | dr. e.f. codd |
| Answer» C. james a. gosling | |