473,398 Members | 2,393 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,398 software developers and data experts.

K&R2 chapter 1, section 1.5.1 File Copying Question

Does anyone know why K&R2 uses the term "File Copying" at this point
(1.5.1)?
Also, in the K&R2 answers to exercises maintained by Richard Heathfield,
for Listing KRX113 Mr Heathfield repeatedly uses the phrase "text file".
This comes well before what I have understood to be "files" are
introduced in the book.
Mar 10 '08 #1
4 1590
Jim Barlow wrote:
Does anyone know why K&R2 uses the term "File Copying" at this point
(1.5.1)?
It might more accurately be called as "stream copying". The probably use
the term file copying because under UNIX all devices are represented
as "files".
Also, in the K&R2 answers to exercises maintained by Richard
Heathfield, for Listing KRX113 Mr Heathfield repeatedly uses the
phrase "text file". This comes well before what I have understood to
be "files" are introduced in the book.
I suppose he is using the term "text file" in it's more commonly
understood meaning in computing, not it's C specific one.

Mar 10 '08 #2
santosh wrote:
Jim Barlow wrote:
>Does anyone know why K&R2 uses the term "File Copying" at this point
(1.5.1)?

It might more accurately be called as "stream copying". The probably use
the term file copying because under UNIX all devices are represented
as "files".
>Also, in the K&R2 answers to exercises maintained by Richard
Heathfield, for Listing KRX113 Mr Heathfield repeatedly uses the
phrase "text file". This comes well before what I have understood to
be "files" are introduced in the book.

I suppose he is using the term "text file" in it's more commonly
understood meaning in computing, not it's C specific one.
Thank you, that clears up the question regarding the K&R book.
I hope Mr. Heathfield will explain his comments in his solution in
Listing KRX113. That one still has me confused.
Mar 10 '08 #3
Jim Barlow said:
Does anyone know why K&R2 uses the term "File Copying" at this point
(1.5.1)?
Also, in the K&R2 answers to exercises maintained by Richard Heathfield,
I don't maintain any such site, and have not done so for years (although
the site is still up, which is astounding since the account was closed
several years ago). The solutions are now maintained at this page:
<http://clc-wiki.net/wiki/K%26R2_solutions>
by the clc-wiki.net team.
for Listing KRX113 Mr Heathfield repeatedly uses the phrase "text file".
Only in an introductory comment which you can in fact ignore completely.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Mar 10 '08 #4
santosh <sa*********@gmail.comwrites:
Jim Barlow wrote:
>Does anyone know why K&R2 uses the term "File Copying" at this point
(1.5.1)?

It might more accurately be called as "stream copying". The probably use
the term file copying because under UNIX all devices are represented
as "files".
All devices, yeah, but not all streams (cf pipes, for example).

--
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
Mar 11 '08 #5

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

Similar topics

12
by: Chris Readle | last post by:
Ok, I've just recently finished a beginning C class and now I'm working through K&R2 (alongside the C99 standard) to *really* learn C. So anyway, I'm working on an exercise in chapter one which...
16
by: TTroy | last post by:
I FOUND MAJOR ERRORS in K&R2 (making it almost useless for the herein mentioned topics). K&R2 Section 5.9 Pointers vs. Multidimension Arrays starts of like this... "Newcomers to C are...
6
by: Deniz Bahar | last post by:
Hi, My english is not top notch and I am trying to understand what K&R2 Ex 5-11 is asking for (pg 118). It says: Modify the programs entab and detab (which I completed from chapter 1 and have...
12
by: arnuld | last post by:
this is exercise 2-3 from the mentioned section. i have created a solution for it but i see errors and i tried to correct them but still they are there and mostly are out of my head: ...
5
by: arnuld | last post by:
it compiles without any trouble but produces "Segmentation Fault" when i try to run it. since i am at chapter 2 so my knowledge of arrays is limited to chapter 1: -------------------------...
16
by: arnuld | last post by:
i have created solution which compiles and runs without any error/ warning but it does not work. i am not able to understand why. i thought it is good to post my code here for correction before...
4
by: arnuld | last post by:
/* K&R@, 1.5.1 - File Copying */ #include<stdio.h> int main() { int c; while((c = getchar())!= EOF) putchar(c);
4
by: arnuld | last post by:
any suggestions for improvement: -------------- PROGRAMME ------------- /* K&R2: section 1.5.3 exercise 1-10 STATEMENT: write a programme to copy its input to output, replacing each TAB by...
88
by: santosh | last post by:
Hello all, In K&R2 one exercise asks the reader to compute and print the limits for the basic integer types. This is trivial for unsigned types. But is it possible for signed types without...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.