Ask Computer Engineering Expert

The assignment is about compiling multiple files. You should have more than three files with whatever names you want. There is one header file. For ex, main.c, getfilename.c, readfile.c, ..., and vi.h. Each file contains just one function.

1. The program starts by printing your name with an end sign ">". For ex, "Name>";

2. Then, you can type in a string. If the string is not "vi xxx", you print "I don't know this command." You keep getting a string until you get a string starting with "vi". For ex, "vi myp.c". Your program will then open "myp.c" for reading. If the file does not exist, then there is nothing to read.

3. Read the file into a fixed array of "mytext[1000][ 81]". Presumably, the "myp.c" text file is not too large with each line 80 characters or fewer. If there are more characters than 80 in a line, you can just ignore the characters beyond 80.

4. Close your file.

5. Change all your texts to upper case, and display the first 20 lines on your screen.

6. Then, your program will wait for a command from the keyboard.

7. If you type ":w", your program will open the same file for writing, and prepare your array of text into that file.

8. If you type ":q!", your program will quite.

9. If your type ":w myp1.c", your program will open "myp1.c" and prepare into that file. You should always close your file after finish.

Remember to use function calls instead of a program of one function. Each function should be shorter than two pages.

10. Display one special character as the cursor using ascii code "@" at the position of mytext[0][0].

11. Replace Step 5. "Change all your texts to upper case" with "Display 20 lines from the current line on the screen". The current line is where you start displaying lines of texts. It's original value is zero, but it can be modified by the cursor moving out of the 20-line frame.

12. You can use "j" to move the cursor down one line, "k" up one line, "h" left one character, and "l" right one character. Of course, if there is no place to move left, right, up, or down, the cursor just stays. Because you moved the cursor, you need to clear the screen and then display again with the new cursor position. system("clear"); will be able to clear the screen. 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M994220

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As