K&R2 exercise 1.17 solution

A

arnuld

there is a solution on "clc-wiki" for exercise 1.17 of K&R2:

http://clc-wiki.net/wiki/K&R2_solutions:Chapter_1:Exercise_17


i see this uses pointers whereas K&R2 have not discussed pointers yet.
i have created a solution myself by modifying the example programme of
section 1.19.

i tried to find the source-code of K&R2 using Google. i found the home
page of K&R2 but not he source-code of book. since my solution is a
modified version of the example programme from the book i wan to know
i can submit that solution to clc-wiki.

does anybody have any idea about this ?
 
S

santosh

arnuld said:
there is a solution on "clc-wiki" for exercise 1.17 of K&R2:

http://clc-wiki.net/wiki/K&R2_solutions:Chapter_1:Exercise_17
i see this uses pointers whereas K&R2 have not discussed pointers yet.

It doesn't use pointer notation for array access. It uses array
indexing notation only. The parameters for the functions can easily be
replaced by char buffer[] without any change.

It's impossible to use arrays without using pointers, whether it's
visible or not. The example you've cited does not use pointer
notation, so your complaint is invalid.
i have created a solution myself by modifying the example programme of
section 1.19.

i tried to find the source-code of K&R2 using Google. i found the home
page of K&R2 but not he source-code of book.

Do you mean the sources for the programs given in the book? Why do you
need them separately? Just extract them from the book itself.
since my solution is a
modified version of the example programme from the book i wan to know
i can submit that solution to clc-wiki.

does anybody have any idea about this ?

Yes, first register on the site, then contact one of the admins,
(Flash Gordon or Netocrat.)
 
F

Flash Gordon

santosh wrote, On 11/03/07 05:27:
arnuld wrote:


Yes, first register on the site, then contact one of the admins,
(Flash Gordon or Netocrat.)

I think that if you include an appropriate acknowledgement it would be
allowable under the "fair usage" rules of copyright assuming the book
does not explicitly disallow it.

Note that some books do explicitly say what you are and are not allowed
to do with the source code they present.

I would, of course, take seriously any complaints from the author or
publisher of any book or code. I make my living from writing software so
I can understand their points!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top