I=B
II=C
III=E
IV=D
V=A
I have to write a bunch of extra things otherwise it won't let me post the answer lol.
I think it'd be terminal concentrator. A(n) terminal concentrator is a front - end processor that multiplexes the traffic from hundreds of remote terminals into one port on a large computer.
Answer:
static int checkSymbol(char ch)
{
switch (ch)
{
case '+':
case '-':
return 1;
case '*':
case '/':
return 2;
case '^':
return 3;
}
return -1;
}
static String convertInfixToPostfix(String expression)
{
String calculation = new String("");
Stack<Character> operands = new Stack<>();
Stack<Character> operators = new Stack<>();
for (int i = 0; i<expression.length(); ++i)
{
char c = expression.charAt(i);
if (Character.isLetterOrDigit(c))
operands.push(c);
else if (c == '(')
operators.push(c);
else if (c == ')')
{
while (!operators.isEmpty() && operators.peek() != '(')
operands.push(operators.pop());
if (!operators.isEmpty() && operators.peek() != '(')
return NULL;
else
operators.pop();
}
else
{
while (!operators.isEmpty() && checkSymbol(c) <= checkSymbol(operators.peek()))
operands.push(operators.pop());
operators.push(c);
}
}
while (!operators.isEmpty())
operands.push(operators.pop());
while (!operands.isEmpty())
calculation+=operands.pop();
calculation=calculation.reverse();
return calculation;
}
Explanation:
- Create the checkSymbol function to see what symbol is being passed to the stack.
- Create the convertInfixToPostfix function that keeps track of the operands and the operators stack.
- Use conditional statements to check whether the character being passed is a letter, digit, symbol or a bracket.
- While the operators is not empty, keep pushing the character to the operators stack.
- At last reverse and return the calculation which has all the results.
Answer:
Option B is the correct answer for the above question.
Explanation:
The array is a user-defined data type that is used to define the multiple variables of the same type which can store in the contiguous memory location. If a user wants to define the array then he can do this by the following syntax in c-programming language-- "int a[7];", where a is an array of 7 variables of the integer type which holds the integer data. The 7 is also called the size of the array 'a'. It states that the array named a can hold the 7 integer value. The above -question also asked about the term which defines how much variables an array can hold. The answer is the size of the array which is stated from the option B. Hence B is the correct answer while the other is not because--
- Option A states about the new operator which is not the correct option.
- Option C states about the data type of the array which is not the correct option.
- Option D states about the version of java which is not the correct option.