write a program that asks the user for a file name and a string to search for. the program should search the file for every occurrence of a specfied string. when the string is found, the line that contains it should be displayed. after all the occurrences have been located, the program should report the number of times the string appeared in the file.

Answers

Answer 1

Just use grep command to look for such pattern supplied either by Pattern parameter in the given file, writing each line that matches to standard output.

What is the program?

The program which asks the user for filename and to search for a string is :

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

int main()

{

string fileName,

    buffer,

    search;

int count = 0;  

cout << "Enter the name of a file: ";

cin  >> fileName;

fstream file(fileName, ios::in);

if (!file)

{

 cout << "Error opening file.\n";

 return 0;

}

cout << "Enter a string to search for in the file \""<< fileName << "\".\n";

cin  >> search;

cout << "\nString: " << search << endl;

cout << "All lines in file that contain the string:\n";

file.seekg(0, ios::beg);

while (!file.fail())

{

 getline(file, buffer);

 if (buffer.find(search,0) < buffer.length())

 {

  cout << buffer << endl;

  count++;

 }

}

cout << "Numer of times the string appeared in file: " << count << endl;

       file.close();

return 0;

}

To learn more about CPP program refer to :

https://brainly.com/question/13441075

#SPJ4


Related Questions

once again, type ipconfig /release and press enter. note that your adapter has no ip address and no subnet mask. these two parameters are necessary to communicate with tcp/ip. how do you predict this command will affect connectivity?

Answers

In the question, the command will not work and hence no connectivity will be established.

What is a command?
When entered or spoken, a command instructs the computer to carry out a particular action. An MS-DOS prompt, for instance, would display a list of the directories and files in the current directory when the user typed the "dir" command and hit Enter. 

A command is a special word that is used to carry out a particular action in a programming language. As an illustration, the command "print" is used to show text on the screen. The screen displays "Hello World!" when the command below is entered and carried out.

To learn more about a command, use the link given
https://brainly.com/question/25808182
#SPJ1

you are looking to print photos that you have saved on a cloud storage account using a third-party online printing service. after successfully logging into the cloud account, you are automatically given access to the third-party online printing service. what allowed this automatic authentication to occur?

Answers

As soon as local transmission starts, Bluetooth audio is automatically turned off. You can re-connect your Bluetooth audio device after cutting off local connectivity.

What does it mean when Bluetooth is disabled?If your Bluetooth driver is outdated or the incorrect one, this issue could arise. To test if it resolves your issue, you should update your Bluetooth driver. Driver Easy allows you to update the driver automatically if you lack the necessary time, patience, or abilities to do so manually.As soon as local transmission starts, Bluetooth audio is automatically turned off. You can re-connect your Bluetooth audio device after cutting off local Select Bluetooth Settings from the search results after typing "Bluetooth Settings" into the Start menu. Click the toggle switch to turn on Bluetooth under the "Manage Bluetooth Devices" section. To turn off Bluetooth functionality, press the toggle switch once more.

To Learn more About Bluetooth disabled Refer to:

https://brainly.com/question/23728337

#SPJ4

Which file format produces smaller files by eliminating some information from the file?.

Answers

Answer:

JPEG

Explanation:

i dont have one but thats the answer:)

object-oriented programming allows you to derive new classes from existing classes. this is called .

Answers

The correct answer is inheritance thatallows you to derive new classes from existing classes.

Inheritance is the procedure in which one class inherits the attributes and methods of another class. The class whose properties and methods are inherited is known as the Parent class. And the class that inherits the properties from the parent class is the Child class. Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces.

To learn more about inheritance click the link below:

brainly.com/question/13041562

#SPJ4

during the maintenance phase of the software development life cycle, the maintenance team takes steps to . a. design an economically feasible system b. gather requirements and analysis c. keep the system up and running d. find out what users need to perform their jobs

Answers

The six primary stages of the software development life cycle (SDLC) are typically its focal point. This procedure is crucial for creating new applications.

What is maintaince phase?

Product managers may successfully lead the entire team through the SDLC process by being aware of what has to be done. It also aids in communicating progress to stakeholders and understanding the milestones.

The planning stage of the SDLC is divided into two parts: the requirement analysis stage, where you examine the viability of producing the product, revenue potential, production costs, user needs, etc.

You can use a feature prioritizing methodology that considers the value of the software/update, the cost, the time it takes to construct, and other criteria to appropriately select what to make, what not to make, and what to make first.

You can proceed to the second stage once it has been determined that the software or update is possible to build, meets user needs, and is consistent with business and stakeholder goals.

To learn more about software, refer to the link:

https://brainly.com/question/985406

#SPJ1

consider two queuing systems: system 1 has three servers each serving at rate 1; system 2 has a single server serving at rate 3. both systems are subject to exp(1) arrivals. which system is better in terms of the expected number of customers in system?

Answers

System 1 is better in terms of the expected number of customers in system. System 1 has handle up to  three servers concurrently.

What does "queuing system" mean?

A queue (or waiting line) forms anytime there are more units in the system than the service facility can handle at once in a queuing system, which is characterized by a system with a service facility at which units of some kind (often referred to as "customers") arrive for service.

First in, first out (FIFO) refers to the practice of serving clients in order of arrival, starting with the one who has waited the longest. The most typical kind of queue discipline is this.

The customer with the shortest wait time is attended to first under the last in, first out (LIFO) alternative to FIFO.

To learn more about queuing system refer to:

https://brainly.com/question/14555199

#SPJ4

listen to exam instructions you manage a network that uses a single switch. all ports within your building connect through the single switch. in the lobby of your building are three rj45 ports connected to the switch. you want to allow visitors to plug into these ports to gain internet access, but they should not have access to any other devices on your private network. employees connected throughout the rest of your building should have both private and internet access. which feature should you implement?

Answers

Employees connected to the rest of your building should have VLANs-based access to both private networks and the internet.

Explain about the VLAN?

A logical overlay network called a virtual LAN (VLAN) is used to separate the traffic for each group of devices that share a physical LAN. A local area network (LAN) is a grouping of computers or other devices that are physically connected to the same network and are situated in the same area, such as the same campus or building.

On a Layer 2 switch, a virtual LAN (VLAN) is formed to scale back the broadcast domain. One of the technologies it employs is the division of huge broadcast domains into smaller ones in order to enhance network performance. According to the type of network they carry, VLANs can be divided into five categories: Standard VLAN

To learn more about VLAN refer to:

https://brainly.com/question/25867685

#SPJ4

which term refers to the 100-mbps standards, even though there are now much faster versions of ethernet available?

Answers

Fast Ethernet refers to the 100-mbps standards, even though there are now much faster versions of ethernet available.

Define Ethernet.

Wide area networks, metropolitan area networks, and local area networks all frequently use the Ethernet family of wired computer networking technologies. In order to build local area networks, Ethernet is basically a common communication protocol.

This enables communication over a network between two or more different network cable types, such as copper to fiber optic and vice versa. Without an internet connection, you can use an Ethernet connection. However, you are limited to speaking with computers and other gadgets connected to an Ethernet network.

To learn more about Ethernet, use the link given
https://brainly.com/question/28314786
#SPJ1

which statement describes a characteristic of the sas automatic variable error ? a. the error variable maintains a count of the number of data errors in a data step. b. the error variable is added to the program data vector and becomes part of the data set being created. c. the error variable can be used in expressions in the data step. d. the error variable contains the number of the observation that caused the data error.

Answers

Option c is correct. The statement that describes a characteristic of the SAS automatic variable error is the error variable can be used in expressions in the data step.

When a session is launched, SAS automatically creates automatic variables, which are system variables. Automatic macro variables and automatic DATA step variables are both created by SAS. The system-generated variables that are formed when the DATA step is executed have the names of automated variables reserved for them. It is advised against using names in your own apps that begin and conclude with an underscore.

The DATA step or DATA step statements can automatically create variables. However, they are not output to the data set that is being created; instead, they are added to the program's data vector. From one iteration of the DATA step to the next, the values of automatic variables are kept rather than being set to missing.

To know more about DATA click here:

https://brainly.com/question/18761322

#SPJ4

what are the intervals of time between the transmissions of the beacon frames the linksys ses 24086 access point?

Answers

The beacon interval, which by default is 100 TUs, is the amount of time between transmissions. Beacon transmissions should ideally happen every 102,400 seconds (102.4 ms).

In 802.11 networks, a beacon is a particular form of management frame that describes the network and its capabilities. Access points send out beacon frames to notify adjacent clients of the network's presence as well as for other crucial network operations including basic service set (BSS) time synchronization and power management.

Clients can associate with the network or, if already connected to another access point, participate in roaming by using the information contained in a beacon. Some of the data in a beacon frame is also useful for delivering broadcast and multicast traffic that was buffered at the access point while the client was sleeping.

Target Beacon Transmission Time is the time at which beacons are periodically sent.

To know more about network click here:

https://brainly.com/question/16663396

#SPJ4

you are diagnosing a network communication problem on a computer that uses the tcp/ip protocol. what address can you use to test network services without actually accessing the network medium?

Answers

127.0.0.1 is the address that we use to test network services without actually accessing the network medium when diagnosing a network communication problem on a computer that uses the tcp/ip protocol.

What is TCP/IP protocol?

TCP/IP specifies how data is transferred from sender to receiver. Application programs first send messages or data streams to one of the Internet Transport Layer Protocols, either the User Datagram Protocol (UDP) or the Transmission Control Protocol (TCP) (TCP).

These protocols receive data from applications, divide it into smaller pieces known as packets, add a destination address, and then forward the packets to the next protocol layer, the Internet Network layer.

The Internet Network layer encloses the packet in an Internet Protocol (IP) datagram, inserts the datagram header and trailer, determines where to send the datagram (directly to a destination or via a gateway), and forwards the datagram to the Network Interface layer.

The Network Interface layer receives IP datagrams and sends them as frames over network hardware such as Ethernet or Token-Ring networks.

To learn more about TCP/IP protocol, visit: https://brainly.com/question/27975075

#SPJ1

If two adjacent columns are selected and then sorted, the left-most column is

a. the primary sort.
b. the secondary sort.
c. the primary filter.
d. the secondary filter.

Answers

A, The primary sort because it will be on the most left.

an employee is attempting to install new software they believe will help them perform their duties faster. when the employee tries to install the software, an error message is received, stating they are not authorized to install the software. the employee calls the help desk for assistance. evaluate the principles of execution control to conclude what has most likely occurred in this scenario.

Answers

The company is utilizing whitelist control and the software is not included on the list.

What is a software?To control computers and carry out particular activities, software is a collection of instructions, data, or programs. Hardware, which describes a computer's external components, is the opposite of software. Applications, scripts, and other programs that operate on a device are collectively referred to as "software."A software package includes a number of computer programs as well as related documentation and data. In contrast, hardware is what the system is made of and what actually does the work.System software, utility software, and application software are some of the numerous kinds of software that can run on a computer.

To learn more about software refer to:

https://brainly.com/question/28224061

#SPJ4

what agency did the united states create to use cyber weapons and to defend against cyberattacks? group of answer choices u.s. cyber command department of network security department of cyber defense department of technology strategy

Answers

U.S. Cyber Command is  the united states create to use cyber weapons and to defend against cyberattacks.

What does the U.S. Cyber Command do?U.S. Cyber Command has information technology, intelligence, and military capabilities.The organization's goal is to lead, synchronize, and coordinate cyberspace strategy and activities in order to protect and advance national interests in cooperation with regional and global partners.Cybersecurity is the defense against cyberthreats for systems connected to the internet, including their hardware, software, and data. The government-wide initiative to comprehend, control, and lower danger to our physical and digital infrastructure is led by the Cybersecurity and Infrastructure Security Agency (CISA).To assist Federal Executive Branch civilian departments and agencies in securing their unclassified networks, turn to the Department of Homeland Security (DHS).

To learn more about Cybersecurity refer,

https://brainly.com/question/28004913

#SPJ4

an investigator finds a usb drive at a crime scene and wants to present it as evidence in court. the investigator takes the usb drive and creates a forensic image of it and takes a hash of both the original usb device and the image that was created. what is the investigator attempting to prove about the usb drive when the evidence is submitted in court?

Answers

The investigator is trying to prove that nothing has been changed by the procedure, and the data in the image is an identical replica.

What is an USB drive?A USB flash drive can be used to launch an operating system from a bootable USB, store crucial files and data backups, transport preferred settings or programmers, perform diagnostics to diagnose computer issues, and more. The drives are compatible with a wide range of BIOS boot ROMs, Linux, MacOS, and Microsoft Windows.Both ones as well as zeros of the data are saved on transistors since USB drives employ Flash memory. When you store data, you charge the transistor's float gate to create a binary zero, and you deplete the charge to create a binary one.Normally, files removed from a USB flash drive were permanently deleted rather than being placed in the recycling bin. The articles as from recycle bin cannot therefore be simply restored.

To learn more about USB drive refer to :

https://brainly.com/question/27800037

#SPJ4

During a fire emergency, what is the very first action you should take according to the race/racer/racee fire protocol?.

Answers

RACE: Remove, Alarm, Confine and Extinguish or Evacuate.

In the event of a fire, the following steps should be taken to ensure the safety of all building occupants:

1.Activate the fire alarm.

2.Call 911 immediately and provide information.

3.Assist injured personnel or notify emergency responders of the medical        
  emergency.

4.Exit the building following emergency maps.
You can learn more about RACE at:

brainly.com/question/22050167#SPJ4

what happens if an encrypted file in an ntfs partition on a windows 10 system is moved to a fat32 partition on a windows 7 system?

Answers

The thing that happens if an encrypted file in an ntfs partition on a windows 10 system is moved to a fat32 partition on a windows 7 system is that the file is said to be decrypted and placed inside the FAT volume.

Where are files that are encrypted kept?

The easiest way to safeguard your privacy while saving data to a cloud storage provider is to encrypt them. Numerous trustworthy zero-knowledge cloud storage providers exist, including Sync.com. Additionally, it is possible to encrypt data using free third-party software before transferring them to the cloud. 16 May 2022

Therefore, Version 3.0 of NTFS introduces the Encrypting File System (EFS), a technology that offers filesystem-level encryption on Microsoft Windows. The technique makes it possible to transparently encrypt files to shield private information from hackers who have physical access to the machine.

Learn more about encrypted file from

https://brainly.com/question/28086395
#SPJ1

Complete the sentence.
Software that allows users to use and adapt it for any purpose, often allowing the public to participate in further development is-
open source
free source
open software

Answers

The correct answer is Open Source Software (OSS) because Open-source software (OSS) is computer software that is distributed under a license that allows users to use, study, change, and distribute the software and its source code to anyone and for any purpose.

What is Open Source Software?

Open source software (OSS) is software that is distributed with its source code, making it available for use, modification, and distribution with its original rights. Source code is the part of software that most computer users don’t ever see; it’s the code computer programmers manipulate to control how a program or application behaves.

Programmers who have access to source code can change a program by adding to it, changing it, or fixing parts of it that aren’t working properly.

OSS typically includes a license that allows programmers to modify the software to best fit their needs and control how the software can be distributed.

To learn more about Open source software (OSS), visit: https://brainly.com/question/10729183

#SPJ13

an engineer is designing a random selection algorithm to return a random output value from a set of input values. the engineer plans to make this algorithm publicly available so other engineers can make use of it later. in this scenario, the engineer would likely want to favor as the most important category when developing their algorithm. a.) ease of understanding b.) runtime complexity c.) accuracy d.) integrity

Answers

In this scenario, the engineer would likely want to favor runtime complexity as the most important category when developing their algorithm. Therefore, the correct answer option is: b.) runtime complexity.

What is time complexity?

Time complexity simply refers to a measure of the amount of time that is required by an algorithm to run till its completion of a task with respect to the length of the input.

What is an algorithm?

In Computer technology, an algorithm can be defined as a standard formula (procedures) which is made up of a set of finite steps and instructions that are executed on a computer system, in order to enable a software proffer a solution to a particular problem under appropriate conditions.

In this context, we can reasonably infer and logically deduce that this engineer would most likely favor runtime complexity because he plans to make this algorithm publicly available, and as such needs to be very fast.

Read more on algorithm here: brainly.com/question/24793921

#SPJ1

Complete Question:

An engineer is designing a random selection algorithm to return a random output value from a set of input values. the engineer plans to make this algorithm publicly available so other engineers can make use of it later. in this scenario, the engineer would likely want to favor _____ as the most important category when developing their algorithm. a.) ease of understanding b.) runtime complexity c.) accuracy d.) integrity

purpose: counts the number of times a character appears in a string name: countchar return: int parameters: a string and a char

Answers

The best method for counting a single character within a string is             str. count(a) . However, you would have to read the entire string as many times as you needed to in order to count more characters.

What is a string?A string is typically a sequence of characters in computer programming, either as a literal constant or as some sort of variable. The latter can either be constant in length or allow its elements to alter (after creation).It is a form of data used in programming that represents text rather than integers, like an integer or floating point unit. It is made up of a sequence of symbols which includes spaces and numerals.A string is frequently implemented as an array data structure of bytes (or words) that records a sequence of elements, typically characters, using some character encoding. A string is typically thought of as a data type.

To learn more about string refer to :

https://brainly.com/question/24275769

#SPJ4

After launching the Mail Merge task pane,
the first step is to:
(A)Identify the data source
(B) Identify the main document
(C) Specify the letter size
(D)Specify the envelope size

Answers

After launching the Mail Merge task pane, the first step is to Identity the main document.

Identify the main document as the first step

The first step is to choose a "document type" in the Mail Merge task pane, which determines the type of mail-merge you want to perform: form letters, e-mail messages, envelopes for mass mailings, labels for mass mailings, or a directory (a list or catalog).

There are six steps in the Mail Merge Task Pane -

Select the document type.Start the document.Select recipients.Write your letter.Preview your letters.

Mail merge using an Excel spreadsheet?

The column names in your spreadsheet correspond to the field names in your mail merge. To address readers by their first name in your document, for example, you'll need separate columns for first and last names.

All data to be merged is present in the first sheet of your spreadsheet.

Data entries containing percentages, currencies, and postal codes are formatted correctly in the spreadsheet so that Word can read their values.

The Excel spreadsheet that will be used in the mail merge is saved locally on your machine.

Changes or additions to your spreadsheet are made before it is linked to your Word mail merge document.

To know more about Mail Merge task, visit: https://brainly.com/question/20904639

#SPJ13

what type of intrusion detection and prevention system (idps) uses a normal traffic baseline, alerts when traffic levels fall outside expected clipping (acceptable or anticipated) levels?

Answers

A type of intrusion detection and prevention system (IDPs) that uses a normal traffic baseline, alerts when traffic levels fall outside expected clipping (acceptable or anticipated) levels is Statistical Anomaly-based.

What is IDS?

IDS is an abbreviation for intrusion detection system and it can be defined as a type of information security (IS) system which is designed and developed to monitor network traffic, validates an end user's identity, and notifies the network engineer when there's a malicious activity.

In Cyber security, a Statistical Anomaly-based simply refers to a type of intrusion detection and prevention system (IDPs) that is designed and developed to alert its end users whenever the level of traffic fall outside expected threshold (acceptable or anticipated) levels, especially by making use of a normal traffic baseline.

Read more on intrusion detection system here: brainly.com/question/14284690

#SPJ1

What creates, reads, updates, and deletes data in a database while controlling access and security?.

Answers

Answer:

API HTTP Request Methods

Explanation:

Every endpoint will have common HTTP Request Methods but these 4 are the most common:
GET: Receives/Reads data
POST:
Creates data
PUT:
Edits/Updates data
DELETE:
Deletes data
Hope this helps you out!

a user needs to uninstall a driver on a computer running windows os (operating system). which page or window does not contain the relevant options to accomplish this?

Answers

On a computer running the Windows OS (operating system), the user needs to uninstall a driver, but the Driver Manager window lacks the necessary options to do so.

What is operating system?A piece of software known as an operating system (OS) acts as the user interface for computer hardware.Every computer system needs at least one operating system to run other programs.Environments are necessary for applications like browsers, Microsoft Office, Notepad games, etc. to operate and perform their tasks.The OS makes it possible for you to communicate with the computer without learning computer language.Any computer or mobile device cannot be used without an operating system.

The following are examples of popular OS (operating system) types:

Operating System for BatchMultiprocessing OS Real Time OS Distributed OS Network OS Mobile OS Multitasking/Time Sharing OS

To learn more about operating system, refer to

brainly.com/question/22811693

#SPJ4

an attacker can substitute a dns address record so that a user computer is redirected to a malicious site. this is .

Answers

DNS spoofing is the method by which an attacker can substitute a DNS address record so that a user's computer is redirected to a malicious site.

What is DNS spoofing?

DNS spoofing (also known as DNS cache poisoning) is an attack in which altered DNS records are used to redirect online traffic to a fraudulent website that looks similar to the intended destination.

Once there, users are prompted to login to (what they believe to be) their account, allowing the perpetrator to steal their access credentials and other sensitive information. Furthermore, the malicious website is frequently used to install worms or viruses on a user's computer, granting the perpetrator long-term access to the computer and the data it contains.

How is DNS Spoofing Done?

To perform DNS spoofing, most attackers use ready-made tools. Some threat actors create their own tools, but for this type of attack, this is unnecessary. The primary target is any location with free public Wi-Fi, but it could be performed in any location with connected devices.

A home or business network could be vulnerable to this attack, but these locations are usually monitored for malicious activity. Because public Wi-Fi is frequently misconfigured and poorly secured, a threat actor has more opportunities to perform DNS spoofing. As a result, whether at home or in public, it is always advisable to consider Wi-Fi security.

To know more about the DNS, visit: https://brainly.com/question/13112429

#SPJ1

how can good security be an enabler with snmp? >>> 12. a) what is the purpose of dynamic routing protocols?

Answers

Many network management technologies that can save money by avoiding travel to solve issues are made possible by excellent security.

Explain about the SNMP?

A networking protocol called Simple Network Management Protocol (SNMP) is used in Internet Protocol networks to manage and keep track of network-connected devices.

The client-server application model used by SNMP allows for information to be gathered by a software server component (the SNMP Manager) querying a software client component (the SNMP Agent), which is installed on a network device. Additionally, the SNMP Agent can be set up to deliver data to the manager without being contacted.

There is no other monitoring protocol standard like SNMP, even after more than 30 years. Almost all network and data center hardware is compatible with this protocol. Any monitoring system today must support SNMP because it is a widely accepted standard.

To learn more about  SNMP refer to:

https://brainly.com/question/27961167

#SPJ4

suppose that you have a mastercard and a visa and you typically use the mastercard because it gives you airmile points for each person. suppose further that mastercard terminates their airmiles program and you switch to visa. the announcement of the termination of the airmiles program would be an example of a(n) for using the mastercard:

Answers

Suppose that you have a Mastercard and a visa and you typically use the MasterCard because it gives you airmile points for each person. suppose further that MasterCard terminates their airmiles program and you switch to visa. the announcement of the termination of the airmiles program would be an example of a "CMAO" for using the MasterCard.

Explain the termination statement.

A lending institution's signature appears on a termination declaration in a legal document. This document serves as proof that a loan that was previously extended by that lender has been paid back by the borrower.

For instance, mortgage lenders are obligated to give termination notifications once the homeowner has paid off the mortgage's remaining balance. Getting this termination statement is crucial because it enables the homeowner to demonstrate that they now have free and clear ownership of their home.

To learn more about termination statement, use the given link
https://brainly.com/question/16969411
#SPJ4

write a program that takes as input a fully parenthesized , arithmetic expression and convert it to a binary expression tree. your program should display the tree in some way and also print the value associated with the root.

Answers

Expression tree infix version of given postfix expression is produced by inorder traversal.

What is expression tree?

Expressions are represented as trees in a data structure called an expression tree. In other words, it is a tree with the operators contained in the nodes and the leaves serving as the operands of the expression. An expression tree allows for data interaction just like other data structures do.

Code for expression tree:

class Node{

char data;

Node left,right;

public Node(char data){

 this.data = data;

 left = right = null;

}

}

public class Main {

public static boolean isOperator(char ch){

 if(ch=='+' || ch=='-'|| ch=='*' || ch=='/' || ch=='^'){

  return true;

 }

 return false;

}

public static Node expressionTree(String postfix){

 Stack<Node> st = new Stack<Node>();

 Node t1,t2,temp;

 for(int i=0;i<postfix.length();i++){

  if(!isOperator(postfix.charAt(i))){

   temp = new Node(postfix.charAt(i));

   st.push(temp);

  }

  else{

   temp = new Node(postfix.charAt(i));

   t1 = st.pop();

   t2 = st.pop();

   temp.left = t2;

   temp.right = t1;

   st.push(temp);

  }

 }

 temp = st.pop();

 return temp;

}

public static void inorder(Node root){

 if(root==null) return;

 inorder(root.left);

 System.out.print(root.data);

 inorder(root.right);

}

public static void main(String[] args) {

 String postfix = "ABC*+D/";

 Node r = expressionTree(postfix);

 inorder(r);

}

}

Output:  The Inorder Traversal of Expression Tree: A  +  B  *  C  /  D  

Learn more about expression tree click here:

https://brainly.com/question/28379867

#SPJ4

a user reports that they cannot connect to a remote ftp server. you go to their workstation and see that you can ping the remote site by its domain name but still cannot connect to it through your ftp client. what could be causing the problem?

Answers

The FTP error 'ECONNREFUSED' is causing the problem to make the connection with a remote FTP server.

ECONNREFUSED is an FTP error that refers to a failed connection to the FTP server. It means that at the given port or address no process is listening at the moment.

As per the scenario given in the statement where you go to check a user's workstation as the user reported that he could not connect to your remote FTP server. In order to resolve the prevailing issue, you ping the remote site by its domain name but still, no connection establishes. It is most probable that an FTP error named 'ECONNREFUSED' is causing the problem of a failed connection.

You can learn more about FTP error at

https://brainly.com/question/15025681

#SPJ4

Select the best answer for the question.
1. A main part of digital ethics focuses on
O A. issues with copyright violations.
O B. options for online shopping.
OC frequency of social media use.
O D. ideas for education websites.

Answers

The majority of digital ethics is concerned with issues of copyright violations

What is copyright violation?

The use or production of copyright-protected material without the permission of the copyright holder constitutes copyright infringement. Copyright infringement occurs when a third party violates the rights granted to the copyright holder, such as the exclusive use of a work for a set period of time. Music and movies are two of the most well-known forms of entertainment that face significant copyright infringement. Infringement cases may result in contingent liabilities, which are funds set aside in the event of a lawsuit.

The use or production of copyright-protected material without the permission of the copyright holder constitutes copyright infringement.Individuals and businesses who create new works must register for copyright protection in order to profit from their efforts.Other parties may be granted permission to use those works through licensing agreements, or the works may be purchased from the copyright holder.

To learn more about copyright violation refer to :https://brainly.com/question/17357239

#SPJ1

The majority of digital ethics is concerned with issues of copyright violations.

What is copyright violation?The use or production of copyright-protected material without the permission of the copyright holder constitutes copyright infringement. Copyright infringement occurs when a third party violates the rights granted to the copyright holder, such as the exclusive use of a work for a set period of time. Music and movies are two of the most well-known forms of entertainment that face significant copyright infringement. Infringement cases may result in contingent liabilities, which are funds set aside in the event of a lawsuit.The use or production of copyright-protected material without the permission of the copyright holder constitutes copyright infringement.Individuals and businesses who create new works must register for copyright protection in order to profit from their efforts.Other parties may be granted permission to use those works through licensing agreements, or the works may be purchased from the copyright holder.

To learn more about copyright violation refer to:

https://brainly.com/question/14855154

#SPJ1

Other Questions
Nachelle signed up for a streaming music service that costs $6 per month. The serviceallows Nachelle to listen to unlimited music, but if she wants to download songs foroffline listening, the service charges $1.25 per song. How much total money wouldNachelle have to pay in a month in which she downloaded 20 songs? How muchwould she have to pay if she downloaded s songs?KCost with 20 songs:Cost with s songs: E please. Points at 50 and Ill give brainly once it lets me name a character trait, virtue, or quality you believe is important to your culture. describe a myth or legend from your culture that reinforces the importance of that trait. D. Variation existed in the traits of the fox population. Foxes with smaller ears and noses were able to stay warmer and were more likely to survive and reproduce to pass their genes on to offspring. Over time, the fox population showed a shift to smaller ears and noses. an astronaut weighs 99 n on the moon, where the acceleration of gravity is 1.62 m/s2. how much does she weigh on earth? group of answer choices 600 n 440 n 61 n 16 n 99 n storico company just paid a dividend of $3.65 per share. the company will increase its dividend by 20 percent next year and then reduce its dividend growth rate by 5 percentage points per year until it reaches the industry average of 5 percent dividend growth, after which the company will keep a constant growth rate forever. if the stock price is $67.25, what required return must investors be demanding on the company's stock? (hint: set up the valuation formula with all the relevant cash flows, and use trial and error to find the unknown rate of return.) (do not round intermediate calculations and enter your answer as a percent rounded to 2 decimal places, e.g., 32.16.) you start with a flask at 900k containing only sulfur trioxide at an unknown pressure and allow the equilibrium below to be established. if the final sulfur trioxide pressure is 5.00 atm, what was its initial pressure? 2 so2 (g) o2 (g) 2 so3 (g) kp PLEASE HELP! 15 POINTS Write two short paragraphs. (3-5 sentences) The first paragraph should summarize how Islam spread. The second paragraph should describe the importance and the results of trade in the Muslim Empire.First Paragraph: The Spread of IslamSecond Paragraph: The Importance and the Results of TradeI know it's a lot i'm sorry T-T according to what you have learned in this class, there are three primary questions that should be asked to help you better analyze an argument. what are these three questions? Which voice part has the melody in every verse of "Chester", regardless of the changing textures?A.) altob.) bassc.) sopranod.) tenor SOMEONE HELP ASAP PLEASE!!!!! Allie deposited $5,000.00 into a new savings account that earns 11% interest compoundedmonthly. How long will it take for the balance to grow to $6,407.00?Round your answer to the nearest month. matics ASelect the correct answer from each drop-down menu.The function f(x) = 500(1+2015)4 models the balance in a savings account.The savings account had an initial balance ofand compoundsResetNextat an interest rate of as the senior prefect of your school, you have been invited to tell parents and teachers association what your school needs most. write your speech The red figure is congruent to the blue figure. Which choice describes a sequence of transformations in which the blue figure is the image of the red figure? 1. Rotate the triangle 90 counterclockwise about the origin and then translate it 7 units left and 1 unit up. 2. Rotate the triangle 90 clockwise about the origin and then translate it 7 units left and 1 unit up.3. Rotate the triangle 90 counterclockwise about the origin and then translate it 1 unit left and 7 units down. 4. Rotate the triangle 90 clockwise about the origin and then translate it 1 unit left and 7 units down. if we expect our significant other to be cheerful when we next see her, this may encourage her to be cheerful. this phenomenon is an example of how 5. On a cattle farm, the ratio of beef cattle to dairy cattle is 4:3.3(a) Interpret the ratio: For everybeef cattle, there arecattle.dairy(b) If there are 24 dairy cattle, how manybeef cattle would there be? Show yourwork. 3. You have probably seen many television commercials in your life. Now it's timeto apply what you have learned in this lesson about attitude formation andattraction. Explain how the makers of TV commercials influence viewers'attitudes and make a product or person seem attractive to large numbers ofpeople. What factors tend to influence attraction? Use terms that appear in thelesson, such as proximity and persuasion. On January 1, 2020, Shay Company issues $700,000 of 10%, 15-year bonds. The bonds sell for $684,250. Six years later, on January 1, 2026, Shay retires these bonds by buying them on the open market for $731,500. All interest is accounted for and paid through December 31, 2025, the day before the purchase. The straight-line method is used to amortize any bond discount.-What is the amount of the discount on the bonds at issuance?-How much amortization of the discount is recorded on the bonds for the entire period from January 1, 2020, through December 31, 2025?-What is the carrying (book) value of the bonds as of the close of business on December 31, 2025?-Prepare the journal entry to record the bond retirement. Solve for a in terms of b, c, and d.c=a+bd 10. Bob buys some games for $13 each. He has a coupon for $5 off the totalprice. If he pays $73, how many games did he buy