Print a prompt, Computer Engineering

When your shell is waiting for input from the user, it should first print a prompt. The prompt should consist of the current working directory followed by the _>_ character. Here is an example of the prompt:

/home/ p r o j e c t s / cs200 / spring13 / s h e l l >

After a user performs a command, the prompt should be printed again on a new line. If the user changes the current working directory, your prompt should show the change. I would recommend using the printf() function from stdio.h for printing the prompt.

Posted Date: 4/3/2013 2:54:20 AM | Location : United States







Related Discussions:- Print a prompt, Assignment Help, Ask Question on Print a prompt, Get Answer, Expert's Help, Print a prompt Discussions

Write discussion on Print a prompt
Your posts are moderated
Related Questions
MIPS' native assembly code only has two branch instructions, beq and bne, and only one comparison instruction, slt. Using just these three instructions (along with the ori instruct

Q Consider the following expression. Assume that complement inputs are available. F(A,B,C,D) = ∑m (1,2,6,9,10,14) + ∑d (4,7,8,11,12) a. Find minimal expression for SOP. Draw

What is a multiple line field? A multiple line field is a special part of field which allows the user to enter multiple lines of data into it.

Logic-based Expert Systems - Artificial intelligence: Expert systems are agents which are programmed to make decisions about real world situations. They are put together by uti

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

What is XML DTD (Document Type Definition)? DTD is a document which defines legal building blocks of a particular XML document. This defines the document structure along with

An experts systems must perform well that is achieve the same levels of performance in the domain of interest that human experts can achieve. But simply producing good so

Rectifier output with fitters: When half-wave and full-wave rectification suffice to deliver a type of DC output, neither produces constant-voltage DC (direct current). To gen

MX is conceptually easy, yet bears the fruit of years of domain experience and research. In a nutshell, JMX describes a standard means for applications to expose management functio

Distinguish between ROM, PROM, EPROM, EEPROM. Ans: ROM: It also called Read Only Memory is a Permanent Memory. The data is permanently stored and cannot be changed in Perm