On Feb 3, 2008 5:14 AM, Aswin Rajamannar <[EMAIL PROTECTED]> wrote:

> I'm new to C programming. While working with files, they say we can open and
> read or edit files. I can't understand the whole shit. What files can we
> open? My friend says we can open  only text files lik .txt and read it and
> add contents to it. But in a book, i saw that we can open files with
> extension .c and work with them. I don't just want to mug up what the text
> book says and write it in exam and pass. Tell me what a file pointer points
> to and what is the big advantage working with files. At a moment, i thought
> of skipping this section and proceed, but i feel you could prove some help
> to me.

You can open ANY kind of file in C and C++, text or binary. To a C
program, a file is just a stream of bytes and it's how the program
intereprets the bytes that is important. Input/output operations are a
pretty important aspect of programming (not just C), and if you can't
use files, you will be losing an important set of skills for the
future.

What text are you learning from, BTW?

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to