Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Re: TechFAQ
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 4215 of 4262
Post > Topic >>

Re: TechFAQ

by Richard Heathfield <rjh@[EMAIL PROTECTED] > Jul 23, 2008 at 11:49 AM

TechFaq360 said:

> Hi ,
> Now you can post your Coding problems on techfaq360.

In your code for detecting circularity in a linked list, you fail to 
initialise pointer2. If there is a circularity, your loop fails to 
terminate. You need to learn how to indent your code, too.

Your code example in your "What is the difference between declaration and 
definition?" section contains two syntax errors.

Your question, "What is the difference between realloc() and free()?" is a

strange one. You might as well ask "what is the difference between input 
and output". Anyway, your answer fails to mention that free() can legally 
be passed pointers returned by calloc and realloc, as well as malloc.

Your explanation fails to mention that realloc may have to move the data
to 
a new location, since it may not be possible to resize the block in place.

You fail to mention that realloc() does at least have /one/ similarity to 
free(), and you wrongly claim that a null pointer input will result in no 
action taking place.

Your question, "how do you find out if a linked-list has an end?", is just

another way of phrasing your earlier question about detecting circularity.

I found all these mistakes in just a few minutes.

I cannot recommend your site to anyone who is interested in getting stuff 
right. To anyone else out there, well hey, what the heck.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www.
+rjh@[EMAIL PROTECTED]
 users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 




 2 Posts in Topic:
TechFAQ
TechFaq360 <techforum3  2008-07-23 04:26:03 
Re: TechFAQ
Richard Heathfield <rj  2008-07-23 11:49:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 13:46:10 CDT 2008.