472,805 Members | 952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

K&R2 exercise 1.17 solution

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

http://clc-wiki.net/wiki/K%26R2_solu..._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 ?

Mar 11 '07 #1
2 2223
arnuld wrote:
there is a solution on "clc-wiki" for exercise 1.17 of K&R2:

http://clc-wiki.net/wiki/K%26R2_solu..._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.)

Mar 11 '07 #2
santosh wrote, On 11/03/07 05:27:
arnuld wrote:
<snip>
>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.)
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!
--
Flash Gordon
Mar 12 '07 #3

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

Similar topics

8
by: arnuld | last post by:
i have created a solutions myself. it compiles without any trouble and runs but it prints some strange characters. i am not able to find where is the trouble. ...
4
by: arnuld | last post by:
as i said, i have restarted the book because i overlooked some material. i want to have some comments/views on this solution. it runs fine, BTW. ------------------ PROGRAMME -------------- /*...
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...
19
by: arnuld | last post by:
this programme runs without any error but it does not do what i want it to do: ------------- PROGRAMME -------------- /* K&R2, section 1.6 Arrays; Exercise 1-13. STATEMENT: Write a program...
5
by: arnuld | last post by:
this is a programme that counts the "lengths" of each word and then prints that many of stars(*) on the output . it is a modified form of K&R2 exercise 1-13. the programme runs without any...
2
by: arnuld | last post by:
i was not even able to understand how should i proceed tow rite solution for this exercise: "Write a program to print a histogram of the frequencies of different characters in its input." ...
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...
6
by: arnuld | last post by:
This is the example from section 4.2, page 71 of K&R2: double atof( char s ) { int i, sign; double val, power; for( i = 0; isspace( s ); ++i )
20
by: Lax | last post by:
Here is my 1st attempt at the solution for K&R2 Exercise 4-12: void itoa(int n, char *s) { if (n < 0) { *s++ = '-'; n = -n; }
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.