Applications MCQ Quiz in বাংলা - Objective Question with Answer for Applications - বিনামূল্যে ডাউনলোড করুন [PDF]
Last updated on Mar 16, 2025
Latest Applications MCQ Objective Questions
Top Applications MCQ Objective Questions
Applications Question 1:
The result equivalent the postfix representation (14 7 / 5 10 - * 9 * 1 +) is _____.
Answer (Detailed Solution Below)
Applications Question 1 Detailed Solution
14 |
7 |
|
operator / → 14 ÷ 7 = 2
2 |
5 |
10 |
|
operator - → 5 - 10 = -5
2 |
-5 |
|
operator * → 2 × (- 5) = -10
-10 |
9 |
|
operator * → -10 × (9) = -90
-90 |
1 |
|
operator + → -90 + 1 = -89
Applications Question 2:
For implementation of recursion system uses _______ data structure.
Answer (Detailed Solution Below)
Applications Question 2 Detailed Solution
Concept:
Stack properties:
- Because of LIFO property it remembers it’s caller so knows whom to return when the function has to return.
- Recursion makes use of system for storing the return addresses of the function calls.
Explanation:
So we need stack to implement recursion and we use stack in case of function calling as well.
Some more application of stack:
- Used to evaluate prefix, postfix and infix expressions.
- To convert one expression to another etc
Hence option 1 is the correct answer.
Applications Question 3:
When a data is to be popped from stack but the given stack is empty; this situation is usually called as
Answer (Detailed Solution Below)
Applications Question 3 Detailed Solution
- A stack is an ordered list in which insertion and deletion are done at one end, called a top.
- The last element inserted is the first one to be deleted. Hence, it is called the Last in First out (LIFO) or First in Last out (FILO) list.
- Stack underflow happens when one tries to pop (remove) an item from the stack when nothing is actually there to remove.
Applications Question 4:
_______ is used to convert from recursive to iterative implementation of an algorithm.
Answer (Detailed Solution Below)
Applications Question 4 Detailed Solution
Concept:
- Iterative implementation is one in which there is a loop by which some part of the code will be repeated.
- Recursive implementation is one in which function calls itself repeatedly.
Explanation:
- Stack is used to convert from recursive to iterative implementation of an algorithm.
- Stack is an abstract data type which follows a certain order named as LIFO (Last in first order) while executing the function calls.
- Stack holds the information about function calls and when a function call occurs, it switches to the called function and after execution, it goes back to the caller function. Return value is stored on to the stack. Stack supports recursive function calls.
- Two basic operations that are used in execution are:
- Push() – it stores an element to the stack
- Pop() – it removes the element from top of the stack. If top of the stack is -1 , it means stack doesn’t contain any element.
Applications Question 5:
The following postfix expression with single digit operands in evaluated using a stack
4 2 5 ^ * 14 7 / - 7 5 * +
Note that ^ is exponentiation operator, * is multiplication operator, / is division operator, + is addition operator and – is subtraction operatorAnswer (Detailed Solution Below) 161
Applications Question 5 Detailed Solution
4 2 5 ^ * 14 7 / - 7 5 * +
Push: 9, 2 and 5
4 |
2 |
5 |
Pop: 2 and 5
Perform operation: 2 ^ 5 = 32
Push: 32
4 |
32 |
|
Pop: 32 and 4
Perform operation: 4 × 32 = 128
Push: 128
Also push: 14 and 7
128 |
14 |
7 |
Pop: 7 and 14
Perform operation: 14 ÷ 7 = 2
Push: 2
128 |
2 |
|
Pop: 128 and 2
Perform operation: 128 - 2 = 126
Push: 126
Also push: 7 and 5
126 |
7 |
5 |
Pop: 5 and 7
Perform operation: 7 × 5 = 35
Push: 35
126 |
35 |
|
Pop: 35 and 126
Perform operation: 126 + 35 = 161
Push: 161
161 |
|
|
After evaluating: 161 is present onto the stack
Hence 161 is the answer for the given postfix operation.Applications Question 6:
The postfix equivalent of the infix expression (a + b)*(c*d - e) * f/g is :
Answer (Detailed Solution Below)
Applications Question 6 Detailed Solution
The correct answer is ab + cd*e - fg*/*.
Key Points
- To convert an infix expression to its postfix equivalent, follow the order of operations and use a stack to manage the operators.
- The given infix expression is (a + b)*(c*d - e) * f/g.
- First, evaluate the expression inside the parentheses: a + b and c*d - e.
- The postfix notation for a + b is ab+.
- The postfix notation for c*d - e is cd*e-.
- Next, multiply the results of these two expressions: (ab+)(cd*e-).
- The postfix notation for this multiplication is ab+cd*e-*.
- Finally, multiply by f and divide by g: (ab+cd*e-)*f/g.
- The postfix notation for this final expression is ab+cd*e-*f*g/.
- Therefore, the postfix equivalent of the infix expression (a + b)*(c*d - e) * f/g is ab+cd*e-*f*g/.
Additional Information
- Infix notation is the standard arithmetic and logical formula notation, where operators are placed between operands (e.g., a + b).
- Postfix notation (also known as Reverse Polish Notation) places operators after their operands (e.g., ab+).
- Postfix notation eliminates the need for parentheses to define operation order.
- This method is particularly useful in computer science for evaluating expressions in a stack-based manner.
Applications Question 7:
Evaluate the following postfix expression and find the correct value in the following- 50, 60, +, 20, 10, -, *
Answer (Detailed Solution Below)
Applications Question 7 Detailed Solution
The correct answer is 1100.
Key Points
- To evaluate a postfix expression, follow these steps:
- Read the expression from left to right.
- Push operands onto a stack.
- When an operator is encountered, pop the required number of operands from the stack, perform the operation, and push the result back onto the stack.
- Let's evaluate the given postfix expression step-by-step: 50, 60, +, 20, 10, -, *
- Push 50 onto the stack.
- Push 60 onto the stack.
- Encounter '+', pop 60 and 50, add them (50 + 60 = 110), push 110 onto the stack.
- Push 20 onto the stack.
- Push 10 onto the stack.
- Encounter '-', pop 10 and 20, subtract them (20 - 10 = 10), push 10 onto the stack.
- Encounter '*', pop 10 and 110, multiply them (110 * 10 = 1100), push 1100 onto the stack.
- After processing all elements, the final value on the stack is 1100, which is the result of the postfix expression.
Additional Information
- Postfix expressions, also known as Reverse Polish Notation (RPN), do not require parentheses to dictate operation precedence.
- They are often used in computer science because they can be easily evaluated using a stack, which simplifies the parsing process.
- Postfix notation is particularly useful in situations where the order of operations needs to be explicitly defined and consistently followed.
- Commonly used in stack-based and expression evaluation algorithms in compilers and calculators.
Applications Question 8:
Which is true for "x in y" membership operator expression used in Python?
Answer (Detailed Solution Below)
Applications Question 8 Detailed Solution
The correct answer is: Returns true if a sequence with the specified value is present in the object
Key Points
- In Python, "x in y" is a membership operator that checks if a sequence (like a list or a string) with the specified value (x) is present in the object (y).
- If the sequence is present, it returns True; otherwise, it returns False. The other options are not related to the "in" operator in Python.
Applications Question 9:
Which operator is invalid in the following statement in the C language code?
a=4**5-8+5%7;
Answer (Detailed Solution Below)
Applications Question 9 Detailed Solution
The correct answer is Option 2.
Key Points
- In C language, the ** operator is not a valid operator.
- The valid operators in the provided statement are:
- * for multiplication
- - for subtraction
- + for addition
- % for modulus (remainder)
- Using ** would result in a compilation error because C does not recognize it as a valid operator.
- In some other programming languages like Python, ** is used for exponentiation, but this is not applicable in C.
Additional Information
- To achieve exponentiation in C, you can use the pow() function from the math.h library. For example, pow(4, 5) would calculate 4 raised to the power of 5.
- Here is a properly formatted source code example in C to demonstrate the valid operators:
#include
int main()
{
int a;
a = 4 * 5 - 8 + 5 % 7;
printf("The result is: %d\n", a);
return 0;
}
Applications Question 10:
_________ is First in Last Out kind of data structure.
Answer (Detailed Solution Below)
Applications Question 10 Detailed Solution
- Stack is data structure which is Last in First Out (LIFO) or First in Last Out (FILO) which means the element which is popped last from stack is pushed first in stack, or element which is pushed first in stack is popped last from stack
- Queue is data structure which is First in First Out (FIFO) or Last in Last Out (LILO)