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

Rom, what is rom

what is rom

C++, whats the out put of int main(){ int n=310; funcone(n); functwo(&n); ...

whats the out put of int main(){ int n=310; funcone(n); functwo(&n); cout return 0; } void funcone(intn) n=240; } void func two(intn*) { n=120; }

Convert string to super ascii, A string S is said to be "Super ASCII", if i...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''''''a''''''''-'''''''

Functions, each of the following functions has the form f(x ) = (ax+b) mod ...

each of the following functions has the form f(x ) = (ax+b) mod n. assume that each function has type N base n arrow N base n, so that we can think of f as a cipher for an alphabet

Source and object programs, Source and Object Programs A set of instruc...

Source and Object Programs A set of instructions in a high-level language are called “Source program”. Since high-level languages are machine independent, it is required to fir

Explain any two issues in web design, Question 1 Explain any two issues in...

Question 1 Explain any two issues in web design Question 2 Mention the factors considered for good design Question 3 What are the advantages of graphical system?

Unspecified bit rate, ATM Theory - Unspecified Bit Rate Is intended for no...

ATM Theory - Unspecified Bit Rate Is intended for non-real time applications, that is, those not requiring tightly constrained delay and delay variation. Examples of applications

Briefly explain html and xml, Question 1 Briefly explain principles of eff...

Question 1 Briefly explain principles of effective navigation Question 2 Explain the terms URI and URL. Why should you use Relative URI? Question 3 What are the di

Microprocessor, what is computer mapped input / output

what is computer mapped input / output

Threading Module of python, The latest threading module comprised with Pyth...

The latest threading module comprised with Python 2.4 provides much more powerful, high-level hold for threads than the old thread module. The threading module depictions all the m

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