1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Minchanka [31]
3 years ago
5

Which of the following postfix expressions corresponds to the given infix expression?

Computers and Technology
1 answer:
Ivan3 years ago
4 0

Answer:

C) 1 4 2 / + 1 + 2 + 3 * 2 /

Explanation:

Infix, Postfix and Prefix are 3 different ways of writing expressions which differ in relative placement of operator and operands.

In Infix , operator lies between the operands whereas in postfix operator is written after its operands.

For example: 1 + 2 is infix while 1 2 + is the corresponding postfix expression.

Converting the given infix expression (1 + 4 / 2 + 1 + 2) * 3 / 2 to postfix:

Let (1 + 4 / 2 + 1 + 2) be represented by x.

Converting x to postfix:

(1 + 4 / 2 + 1 + 2)  =>  1 4 2 / + 1 + 2 +       ------------------------- (1)

So the overall infix expression becomes:

x * 3 / 2

Converting it to postfix:

x 3 * 2 /

Replacing the value of x from (1)

1 4 2 / + 1 + 2 + 3 * 2 /

You might be interested in
You can change the ____ or position of text within a document's margins.
ahrayia [7]

Answer:

Alignment

Explanation:

That should be correct

7 0
3 years ago
What is the difference between morals and ethics?
Kipish [7]

<u>Answer</u>:

<em>B. Morals are individually held beliefs, while ethics are imposed by an </em>

<em>organization.</em>

<u>Explanation</u>:

<em>Morals are the beliefs designed or created by group of people.</em> It is concerned whether an action is right or wrong. It is basically a lesson learned from a situation or a story. <em>It also convey truth.  </em>

Ethics are set of rules designed by <em>external agent or organization</em> and it differs from place to place but they have basic ethics in common.

<em>It is a branch of philosophy. These are also not relative to the situation. Both moral and ethics are used interchangeably. </em>

6 0
4 years ago
Remember not to use tools that are ________ in any way.
kupik [55]
Remember not to use tools that are rusty and damaged in any way.
3 0
3 years ago
In this assignment, you are provided with working code that does the following: 1. You input a sentence (containing no more than
Olegator [25]

Answer:

The code is given below,

import java.io.File;

import java.io.FileInputStream;

import java.util.ArrayList;

import java.util.List;

import java.util.Scanner;

public class SentenceUtilsTest {

public static void main(String[] args) {

List<SentenceUtils> sList = new ArrayList<SentenceUtils>();

try{

File file = new File(args[0]);

Scanner scanner = new Scanner(new FileInputStream(file));

while(scanner.hasNextLine()){

String sent = scanner.nextLine();

if(sent.trim().length() > 0){

SentenceUtils sUtils = new SentenceUtils(sent);

sList.add(sUtils);

}

}

System.out.println("File that was read:" + args[0]);

System.out.println("File contains " + sList.size() + " sentences.\n");

System.out.println("Sentences reports:\n");

for(int line = 0; line < sList.size(); line++){

System.out.println("Sentences " + line +";");

System.out.println(sList.get(line).getSentence());

SentenceUtils lineText = sList.get(line);

String[] tokens = lineText.getTokens();

for(int id = 0; id < tokens.length; id++){

System.out.println(id+":"+tokens[id]);

}

String[] shingles = lineText.getShingles();

for(int id = 0; id < shingles.length; id++){

if(shingles[id] != null){

System.out.print(shingles[id]+" ");

}

}

System.out.println("\n");

}

}catch(Exception ex){

ex.printStackTrace();

}

}

}

package sentenceutils;

import java.util.ArrayList;

import java.util.List;

public class SentenceUtils {

private String sentence;

private String[] tokens;

private String[] shingles;

public SentenceUtils(String s){

this.sentence = s;

generateTokens();

generateShingles();

}

private void generateShingles() {

List<String> shinglesList = new ArrayList<String>();

for (int index=0; index < sentence.length()-1; index++) {

shinglesList.add( sentence.charAt(index) +""+sentence.charAt(index+1) );

}

shingles = new String[sentence.length()];

shinglesList.toArray(shingles);

}

private void generateTokens() {

tokens = sentence.split(" ");

}

public String getSentence() {

return sentence;

}

public String[] getTokens() {

return tokens;

}

public String[] getShingles() {

return shingles;

}

}

4 0
3 years ago
4. _______ are miniature versions of the slides in a presentation. A. ScreenTips B. Thumbnails C. Window controls D. Shapes
Ber [7]
B.
Thumbnails is correct
6 0
4 years ago
Read 2 more answers
Other questions:
  • 6.12 Nested Increments Write a program for spiritual lumberjacks who want to show their appreciation for each tree they 'kill' b
    12·1 answer
  • If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?
    13·2 answers
  • Which of the following is a basic principle of improvement?
    13·1 answer
  • Why does esherick say the name of the boxer rebellion in inaccurate
    5·1 answer
  • The motion of any object can be broken down into it's component (parts of) vectors. true or false
    5·1 answer
  • Sayeed needs to ensure that his manager is up to date on his progress and wants to send a Status Report for a particular task. I
    11·2 answers
  • Assume a PHP document named hello.php has been saved in a folder named carla inside the htdocs folder on your computer. Which is
    11·1 answer
  • What features are offered by most of the email programs with for receiving and sending messages?
    10·1 answer
  • Go to this link: https://platform.breakoutedu.com/game/play/going-buggy-78#
    8·1 answer
  • One subtask in the game is to ‘refuel a car’. Explain why ‘refuel a car’ is an abstraction.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!