

MCQOPTIONS
This section includes 721 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
701. |
What is the value of the postfix expression 6 3 2 4 + – *: |
A. | Something between -5 and -15 |
B. | Something between 5 and -5 |
C. | Something between 5 and 15 |
D. | Something between 15 and 100 |
Answer» E. | |
702. |
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 or more |
Answer» C. 3 | |
703. |
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 or more |
Answer» D. 4 or more | |
704. |
Which of the following applications may use a stack? |
A. | A parentheses balancing program |
B. | Tracking of local variables at run time |
C. | Compiler Syntax Analyzer |
D. | All of the mentioned |
Answer» E. | |
705. |
Entries in a stack are “ordered”. What is the meaning of this statement? |
A. | A collection of stacks is sortable |
B. | Stack entries may be compared with the ‘<‘ operation |
C. | The entries are stored in a linked list |
D. | The entries are stored in a linked list |
Answer» E. | |
706. |
Pushing an element into stack already having five elements and stack size of 5 , then stack becomes |
A. | Overflow |
B. | Crash |
C. | Underflow |
D. | User flow |
Answer» B. Crash | |
707. |
In a stack, if a user tries to remove an element from empty stack it is called _________ |
A. | Underflow |
B. | Empty collection |
C. | Overflow |
D. | Garbage Collection |
Answer» B. Empty collection | |
708. |
Process of removing an element from stack is called __________ |
A. | Create |
B. | Push |
C. | Evaluation |
D. | Pod |
Answer» E. | |
709. |
Process of inserting an element in stack is called ____________ |
A. | Create |
B. | Push |
C. | Evaluation |
D. | Pop |
Answer» C. Evaluation | |
710. |
Assuming int is of 4bytes, what is the size of int arr[15];? |
A. | 15 |
B. | 19 |
C. | 11 |
D. | 60 |
Answer» E. | |
711. |
What are the disadvantages of arrays? |
A. | We must know before hand how many elements will be there in the array |
B. | There are chances of wastage of memory space if elements inserted in an array are lesser than than the allocated size |
C. | There are chances of wastage of memory space if elements inserted in an array are lesser than than the allocated size |
D. | All of the mentioned |
Answer» E. | |
712. |
What are the advantages of arrays? |
A. | What are the advantages of arrays? |
B. | Used to implement other data structures like stack and queue |
C. | Convenient way to represent matrices as a 2D array |
D. | All of the mentioned |
Answer» E. | |
713. |
Which of the following concepts make extensive use of arrays? |
A. | Binary trees |
B. | Scheduling of processes |
C. | Caching |
D. | Spatial locality |
Answer» E. | |
714. |
When does the ArrayIndexOutOfBoundsException occur? |
A. | Compile-time |
B. | Run-time |
C. | Not an error |
D. | None of the mentioned |
Answer» C. Not an error | |
715. |
What is the output of the following piece of code? public class array { public static void main(String args[]) { int []arr = {1,2,3,4,5}; System.out.println(arr[5]); } } |
A. | 4 |
B. | 5 |
C. | ArrayIndexOutOfBoundsException |
D. | InavlidInputException |
Answer» D. InavlidInputException | |
716. |
What is the output of the following piece of code? public class array { public static void main(String args[]) { int []arr = {1,2,3,4,5}; System.out.println(arr[2]); System.out.println(arr[4]); } } |
A. | 3 and 5 |
B. | 5 and 3 |
C. | 2 and 4 |
D. | 4 and 2 |
Answer» B. 5 and 3 | |
717. |
Which of the following is a correct way to declare a multidimensional array in Java? |
A. | int[][] arr; |
B. | int arr[][]; |
C. | int []arr[]; |
D. | All of the mentioned |
Answer» E. | |
718. |
How do you instantiate an array in Java? |
A. | int arr[] = new int(3) |
B. | int arr[]; |
C. | int arr[] = new int[3]; |
D. | int arr() = new int(3); |
Answer» D. int arr() = new int(3); | |
719. |
How do you initialize an array in C? |
A. | int arr[3] = (1,2,3); |
B. | int arr(3) = {1,2,3}; |
C. | int arr[3] = {1,2,3}; |
D. | int arr(3) = (1,2,3); |
Answer» D. int arr(3) = (1,2,3); | |
720. |
Which of these best describes an array? |
A. | Which of these best describes an array? |
B. | Container of objects of similar types |
C. | Container of objects of mixed types |
D. | All of the mentioned |
Answer» C. Container of objects of mixed types | |
721. |
In tree structure, when deleting a directory that is not empty : |
A. | The contents of the directory are safe |
B. | The contents of the directory are also deleted |
C. | contents of the directory are not deleted |
D. | none of the mentioned |
Answer» C. contents of the directory are not deleted | |