arrays and strings, Basic Computer Science

Assignment Help:
This is a C file.
1. The program starts by printing your name with an end sign ">". For example, "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 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][ 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 write 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 write 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.

Related Discussions:- arrays and strings

Computer, what is the computer science

what is the computer science

Experiment with computer system measurements, In this assignment, you need ...

In this assignment, you need to experiment with computer system measurements. Firstly, pick a platform to study. Any Unix-based system (such as a PC running some version of Linu

Distinguish between passive and active attacks, QUESTION (a) Distinguis...

QUESTION (a) Distinguish between passive and active attacks. (b) Give two reasons why it is important to organise security awareness programs for users. (c) Explain how s

Handling Text Files, I. Write an application that accomplishes the followin...

I. Write an application that accomplishes the following tasks: 1. Read a text file that contains, integers, doubles, alphabet, alphanumeric, and others. The name of the input fil

Potential risks to information systems, Question 1 Write about Pot...

Question 1 Write about Potential Risks to Information Systems Factors to be addressed for making information systems more secure Question 2 Write about the foll

The internet or the world wide web, The internet or the World Wide Web is ...

The internet or the World Wide Web is the most familiar and popular example. These databases hold vast amounts of information, for example, on companies. By obtaining details in t

ExtremeWhether.html, How to crete a web page name esp.html that allows user...

How to crete a web page name esp.html that allows users to conduct an ESP test

C program, #write a c program to print ant and rod #

#write a c program to print ant and rod #

Computer Networking Scenario help, The project designs a school computer la...

The project designs a school computer lab with the necessary hardware and software components along with the IP address for different components. The computer lab consists of one I

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