English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write an algorithm

The goal is to count the number of characters, of words, of lines in a message save on
a file.

A Possible character is:

Alphanumeric
Space
New line
EOF message

*And How to write in C language

2006-07-11 19:53:37 · 3 answers · asked by Tiger L 1 in Computers & Internet Programming & Design

3 answers

I am not going to help you with your hw, but I can give you clues.

Look at sime of the libraries and standard functions for C. you can usually get a line from a file. Each line can be stored in a string, there are usually functions that will give you the length of the string. and that would be the number of characters.

So look some of these things up, and Good Luck

2006-07-11 20:00:41 · answer #1 · answered by demaman 3 · 1 0

I believe that you are just starting off on C programming. I guess there is a similar program in Kerninghan and Ritchie's classic book "Programming in C" as well as in "Object Oriented Programming in Turbo C++" by Robert Lafore.

2006-07-12 03:11:12 · answer #2 · answered by swami060 3 · 0 0

no need to go for high standard books
u can get the exact programme written in c in the famous book let us c by yashwant kanitkar
there in the chapter of file handling u will get ur programme

2006-07-12 04:45:42 · answer #3 · answered by cool_ashu2 1 · 0 0

fedest.com, questions and answers