Write your array of text into file, Computer Engineering

Assignment Help:

Part I:

1. The program starts by printing your initial with an end sign ">". For example, "cjx >";

2. Then, you can type in the following "vi filename". For example, "vi myp.c". You 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][ 80]". Presumably, the "myp.c" text file is not too large with each line 80 characters or fewer. If there are more in the file, just ignore.

4. Close your file if it is open.

5. Change all your texts to upper case, and display the first 80 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 write your array of text into that file.

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

Part II: 

9. Replace "5. Change all your texts to upper case, and display the first 80 lines on your screen" with "Display the first 20 lines on the screen";

10. Display one special character using ascii code "176" or "178" at the position of mytext[0][0]. You are not supposed to change the array though;

11. You can use "j" to move the special character down one line, "k" up one line, "h" left one character, "l" right one character. Of course, if there is no place to move left, right, up, or down, the special character just stays.   In order to display the moved character, you may redisplay the first 20 lines again.

12. If you move beyond the first 20 lines, you should display the lines that are available with the special character at the top or bottom of the displayed 20 lines if you are moving out of the current 20 lines.


Related Discussions:- Write your array of text into file

Analog-to-digital conversion process, A stationary random displacement sign...

A stationary random displacement signal was digitised at 64 samples a second and analysed to obtain an auto-spectral density.  The signal was calibrated in mm units.  The frame siz

What is tape backup, Q. What is Tape Backup? Magnetic tapes are used th...

Q. What is Tape Backup? Magnetic tapes are used these days in computers for the below purposes: Backing up data stored in disks. It is essential to regularly save data s

Explain about iframe, Q. Explain about IFRAME? is an HTML 4.0 addition...

Q. Explain about IFRAME? is an HTML 4.0 addition to frames toolbox. Presently only MSIE supports . Unlike frames created employing and

Define the translator which perform macro expansion, Define the translator ...

Define the translator which perform macro expansion is known as a                      Macro pre-processor is the translator which perform macro expansion

Components of information super highway infrastructure, Explain the compone...

Explain the components of Information Super Highway Infrastructure. The Information Superhighway is more than the Internet. It is a sequence of components, having the collectio

Why timing signal distributor required, Q. Why Timing Signal Distributor r...

Q. Why Timing Signal Distributor required? What do you mean by Memory Cycle? How many Memory Cycles required for following instructions: 1. ADD 2. CLEAR and ADD 3. DC

Neural networks as perceptrons, Neural networks as perceptrons: Howeve...

Neural networks as perceptrons: However ANNs look like this in the general case:  Considered that the w, x, y and z represent real valued weights so all the edges in t

What is class and class diagram, What is class, class diagram? An objec...

What is class, class diagram? An object is an instance of a class. Class explains a group of objects with similar properties (attributes), behaviour (operations), kinds of rela

Describe about relationships and look up fields, Relationships are imported...

Relationships are imported from the source to finish without any hindrance but once they land in the destination they can never be changed or changed and change of extensions canno

Write Your Message!

Captcha
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