arrays and strings, Basic Computer Science

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.
Posted Date: 2/25/2013 7:05:42 PM | Location : United States







Related Discussions:- arrays and strings, Assignment Help, Ask Question on arrays and strings, Get Answer, Expert's Help, arrays and strings Discussions

Write discussion on arrays and strings
Your posts are moderated
Related Questions

Question 1 Explain the important concepts of modern CPU Question 2 Discuss the instructions that need to follow while installing new mother board Question 3 Explai

For a processor to be able to process an instruction, it requires to be able to determine what the instruction is asking to be carried out. For this to take place, the CPU requires

Web Browser:   A Web browser is software application that enables you to find, retrieve, and display information available on the World Wide Web (WWW). Browser also allows you

draw the e r diagram for irctc rail ticket reservation online

Consider a class called Configuration. This class “encapsulates” the configuration management for any software system. For example, once created, the user can simply ask the config

E-MAIL: Internet has changed the art of writing letters to email.  Email is one of the ways on Internet to send messages to another person across the network. E-mail and posta

OVERALL FUNCTIONS : There are three points that must be borne firmly in mind when considering the use of computers in laboratory management. Overall Function This includes

Question 1 Explain the importance of graphics in multimedia. What are few of the tips to keep in mind while using graphics for the web? Question 2 Write a long note on co

im student of BSCS 1st semester and I have to make project for IT fair and I dont know computer that very much so please I required your help, help me if you can. thanks