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

Interactive computer graphics.., graphical adapters and input methods in co...

graphical adapters and input methods in computer graphics

Operating system, explain network operating system and design issues?

explain network operating system and design issues?

Use of parallel construct with private clause, Q. Use of parallel construct...

Q. Use of parallel construct with private clause? In this example we would see use of parallel construct with private and firstprivate clauses. At end of program i and j remain

Important points of simulations, Important points of simulations In thi...

Important points of simulations In this simulation it is essential to consider: (1)  What and how data is gathered (2)  How simulation is done (3)  How system would wo

Isoquants, what are the types of isoquants

what are the types of isoquants

What is the difference between awt and swt, SWT (Standard Widget Toolkit) i...

SWT (Standard Widget Toolkit) is a totally independent Graphical User Interface (GUI) toolkit from IBM. They formed it for the creation of Eclipse Integrated Development Environmen

What is clearquest, Rational ClearQuest is a change-request management tool...

Rational ClearQuest is a change-request management tool that tracks and handles defects and change requests all through the development process. With ClearQuest, you can manage eac

Illustrate the working of encoders, Q. Illustrate the working of Encoders? ...

Q. Illustrate the working of Encoders? An Encoder performs reverse function of decoder. An encoder has 2n input lines and 'n' output line. Let's see 8 ×3 encoder that encodes 8

How e-commerce works for the customer, The customers visit the website and ...

The customers visit the website and browse through the products, looking at pictures and products details. When the customer finds his desired product, he usually adds it to his ca

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