Translate the pseudo-code below into a c program

Assignment Help Basic Computer Science
Reference no: EM131899021

Translate the pseudo-code below into a C program to act like a small shell that processes single commands entered by the user. In particular, the program assembles the command and execute it. The commands/programs location can be anywhere in $PATH and might have arguments.

E.g., if the input-line entered by the user is ls -F your program should assemble this command-lines and execute it. The pseudo-code

Algorithm:

While(1) begin read command line from user // Use Unix read/write system calls assemble command args duplicate current process (fork) child should exec to the new program parent process waits for its child to terminate end

Reference no: EM131899021

Questions Cloud

What you know about adolescent development : Given what you know about adolescent development, assess Manny's main problems. Predict which of the problems might worsen without proper intervention.
Utilize a loop to read five floating-point grades : This Python program will be for important statistics for the grades in a class. The program will utilize a loop to read five floating-point grades
Which of these stocks should be bought : If the risk-free rate of return were 7% and the return on the market is expected to be 14%, which of these stocks should be bought?
You are considering two mutually exclusive projects : You are considering two mutually exclusive projects, At what discount rate would make you indifferent between choosing one project or another?
Translate the pseudo-code below into a c program : Translate the pseudo-code below into a C program to act like a small shell that processes single commands entered by the user.
Discuss the nature of virtue in the meno : Discuss the nature of virtue in the Meno and/ or Phaedo. If you choose the Meno things you should mention are some of Meno's definitions of virtue.
What does it mean to design an experience : We've used the term "interaction" and "experience" a lot in the class. But what does it mean to interact with a digital tool in order to achieve a set of goals?
Develop an argument for scope reporting mechanisms : Develop an argument for scope reporting mechanisms. At a minimum, what types of reports do you consider necessary for document control of a project. Why?
Cost of health care in the us : In the news, there has been discussion regarding the cost of health care in the United States. Conduct research on this topic and provide the reasons

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Type of strategic approach

What type of strategic approach do they use? Explain.

  Write a program named orderreceipt for the magic blender

Write a program named OrderReceipt for the Magic Blender Company. The program prompts the user for a name, street address, city, state, zip code, and quantity of blenders ordered at $39.95 each. In an attractive format (similar to Figure 2-24), displ..

  Important for a business to know their break-even point

Why is it important for a business to know their break-even point? Cite an example and support your answer with your rationale.

  Write a create table statement to create table slide_show

Set the data type of Name and Description however you deem appropriate. Set the data type of Purpose to char (15), and limit it to the set of values (‘Home', ‘Office', ‘Family', ‘Recreation', ‘Sports', ‘Pets'). Execute your CREATE TABLE statement ..

  Determine the semantic interpretation by the grammar

Determine what semantic interpretation would be given to the following sentences by the grammar in this chapter.

  The organization internal and customer data

ESL Inc. is a large company that has been using a series of spreadsheets, access databases, and manual records to keep track of the majority of the organization's internal and customer data.

  Interface of a device

Write a short critique (3-4 paragraphs) of the interface of a device, a web site, or a piece of software. Provide a picture or a sketch that illustrates.

  Find the marginal cost

Business The controller for an electronics company has used the production figures for the last few months to determine that the function c(x) = -9x5 + 135x3 + 10,000 approximates the cost of producing x thousands of one of their products.

  Criminal offence under the companies act 2016

Advise whether Atan, Bella and Chan have committed any criminal offence under the Companies Act 2016.

  Two vulnerability analysis tools used in research

two Vulnerability Analysis tools used in research and/or commercially available and describe their main features and functionality. Compare and contrast their relative strengths and weaknesses

  World of network architecture and the process

In today's world of network architecture and the process by which companies communicate with their employees and their customers

  Find the smallest positive integer y

Find the smallest positive integer Y such that integer K great than or equal to Y, a postage of K cents can be formed using only 3-cent and 4-cent stamps. And prove that the Y value you find is correct

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd