473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

need tutorial on low level file i/p o/p

i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
Mar 13 '08 #1
13 1831
broli wrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.

--
Ian Collins.
Mar 13 '08 #2
On Mar 13, 2:16 pm, Ian Collins <ian-n...@hotmail.comwrote:
broli wrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.

--
Ian Collins.

I think open and read are the commands used for low level file
operations.
Mar 13 '08 #3
broli wrote:
On Mar 13, 2:16 pm, Ian Collins <ian-n...@hotmail.comwrote:
>broli wrote:
>>i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.
Please don't quote signatures.
>
I think open and read are the commands used for low level file
operations.
You are confusing POSIX I/O functions with those from standard C. C
offers the 'f' family of functions which operate on FILE* streams.
POSIX functions use file descriptors.

For more information on those, consult you man pages then ask on
comp.unix.programmer.

--
Ian Collins.
Mar 13 '08 #4
broli wrote:
On Mar 13, 2:16 pm, Ian Collins <ian-n...@hotmail.comwrote:
>broli wrote:
i looked up a few on the internet but it seems there is way too
much contradictions. It doesn't seem like K & R 2 covers it either.

Covers what? Ah, file IO. Please put your question in the body of
your post.

What don't you understand? fread and fwrite are pretty
straightforward functions.
I think open and read are the commands used for low level file
operations.
Open and read are actually POSIX defined functions. The standard itself
is available at:

<http://www.unix.org/version3/online.htmlYou need to "register".
<http://www.opengroup.org/onlinepubs/009695399/Free to read.

Some tutorials that incorporate these low level I/O functions are:

<http://www.cs.cf.ac.uk/Dave/C/>
<http://www.faqs.org/docs/artu/>
<http://www.iu.hio.no/~mark/unix/unix_toc.html>

Mar 13 '08 #5
In article <63*************@mid.individual.net>,
Ian Collins <ia******@hotmail.comwrote:
>broli wrote:
>On Mar 13, 2:16 pm, Ian Collins <ian-n...@hotmail.comwrote:
>>broli wrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.
Please don't quote signatures.
>>
I think open and read are the commands used for low level file
operations.

You are confusing POSIX I/O functions with those from standard C. C
offers the 'f' family of functions which operate on FILE* streams.
POSIX functions use file descriptors.
I don't think "confused" is the word.

Asking about something which is:

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Yes. True.

Mar 13 '08 #6
Ian Collins <ia******@hotmail.comwrites:
broli wrote:
>i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.
What don't you understand about low level file access? Are you trying
for Mr Pedantic CLC 2008 this year?

To the op, here is some related stuff:

http://www.cs.utah.edu/dept/old/texi...ibrary_12.html

A good start for finding your platform specifics I dare say.

Good luck!
Mar 13 '08 #7
broli wrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
K&R2 do cover some of these functions in chapter eight. Also see the
links I gave you elsethread.

Mar 13 '08 #8
"broli" writes:
>i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
One possible hotbed of contradictions is to compare this newsgroup
commentary with K&R. K&R covers *all* the functions and does not give any
editorial content on which ones to use, which should be favored and so on.
After several years of experience with careless (or whatever) coding, some
of the functions are considered by the mavens as dangerous and unfit to
use. A little time spent following some of the threads on this subject on
this newsgroup exposes the pitfalls involved with some of the verboten
functions. Think of a monkey typing aimlessly for hours in response to a
simple, single request for "Age ?" to see a lot of these problems. Pretend
that after 50 years or so a human intervenes and presses the Enter key.
Mar 13 '08 #9
On Mar 13, 4:02 am, broli <Brol...@gmail.comwrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
Do you have a specific question in mind? File I/O covers a lot of
ground.
Mar 13 '08 #10
broli wrote:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

Incorrect. Look at chapter 8 of K&R2, UNIX system interface,
specifically:

8.2 Low Level I/O - Read and Write

Brian
Mar 13 '08 #11
broli wrote:
Ian Collins <ian-n...@hotmail.comwrote:
>broli wrote:
>>i looked up a few on the internet but it seems there is way too
much contradictions. It doesn't seem like K & R 2 covers it
either.

Covers what? Ah, file IO. Please put your question in the body
of your post.

What don't you understand? fread and fwrite are pretty
straightforward functions.

I think open and read are the commands used for low level file
operations.
No they are not. They are not in the standard C library. Some
systems may have them at a different level. Others may not.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 13 '08 #12
Default User wrote:
broli wrote:
>i looked up a few on the internet but it seems there is way too
much contradictions. It doesn't seem like K & R 2 covers it either.

Incorrect. Look at chapter 8 of K&R2, UNIX system interface,
specifically:

8.2 Low Level I/O - Read and Write
That is not part of the language. It is an indication of the
implementation. The chapter is so marked.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 13 '08 #13
CBFalconer wrote:
Default User wrote:
broli wrote:
i looked up a few on the internet but it seems there is way too
much contradictions. It doesn't seem like K & R 2 covers it either.
Incorrect. Look at chapter 8 of K&R2, UNIX system interface,
specifically:

8.2 Low Level I/O - Read and Write

That is not part of the language. It is an indication of the
implementation. The chapter is so marked.
So? The statement was, "It doesn't seem like K & R 2 covers it either."


Brian
Mar 13 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Active8 | last post by:
I did this once and can't remember how <blush> so I read the reportlab user guid. It says to unzip the reportlab archive - this is on w2k, BTW, with Python23 - to a directory and make a file...
7
by: Rensjuh | last post by:
Hello, does someone have / know a good C++ tutorial for beginnners? I would prefer Dutch, but English is also fine. Hoi, heeft / kent iemand nog een goede C++ tutorial voor beginners? Het liefste...
10
by: Alf P. Steinbach | last post by:
The fifth part of my attempted Correct C++ tutorial is now available, although for now only in Word format (use free Open Office if no Word), and also, it's not yet been reviewed at all -- ...
4
by: jester.dev | last post by:
I am learning c through an online tutorial currently. And I am running Linux, but the tutorial does not deal specifically with linux. I'm not sure if I am compiling correctly or not because I get...
2
by: Michael Mayer | last post by:
This is not an ad for the best c# tutorial on the internet! And not from anybody world known. I just wanted to start a thread (to possibly gather more interest) based on a post Jon Skeet made...
1
by: Shapper | last post by:
Hello, I am developing a web site where half of the pages are public and the other half are accessible only to registered users. The pages which are accessible only to registered users have...
14
by: knal | last post by:
Hi there, I'm looking for a secure login script for a sort-of-community site... (PHP, MySQL, sessions, or maybe something else ... ) I know there are a lot of scripts out there, but none of them...
12
by: adamurbas | last post by:
ya so im pretty much a newb to this whole python thing... its pretty cool but i just started today and im already having trouble. i started to use a tutorial that i found somewhere and i followed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.