| | |
Starting " C "
![]() |
•
•
Join Date: May 2009
Posts: 10
Reputation:
Solved Threads: 0
the links are helpful to the newbies but definitely should try out practically otherwise the facts wont be clear n definite needs lots of practise to become an expert in C.
Can you please remove the HowStuffWorks link from the original post or better yet point out that it's horrible. It is full of information that ranges from misleading to outright incorrect, which could be harmful to someone learning C. An except from the section on Using Pointers with Arrays for example:
This of course is blatantly incorrect. The author of the article seems to be confused by the fact that a and b are converted to a pointer to their first elements when applied to an operator other than sizeof and unary &. This does not make them pointers or "permanent pointers" (ref. ISO/IEC 9899:1999 6.3.2.1#3)
There are many other examples, including but not limited to:
If I'm accused of nitpicking, I certainly didn't have much trouble finding errors. Every page I looked at seems to have something dubious on it. You might also argue that the above issues are technicalities and beyond the scope of a beginner's C tutorial. This well may be the case, but then perhaps there should be some footnotes explaining this. It doesn't excuse it, and I'm sure I could produce another 10-20 examples if I had the time.
C Syntax (Toggle Plain Text)
#define MAX 10 /* snip */ int a[MAX]; int b[MAX];
•
•
•
•
Arrays in C are unusual in that variables a and b are not, technically, arrays themselves. Instead they are permanent pointers to arrays. a and b permanently point to the first elements of their respective arrays -- they hold the addresses of a[0] and b[0] respectively. Since they are permanent pointers you cannot change their addresses. The statement a=b; therefore does not work.
There are many other examples, including but not limited to:
- Variable Types:
Here, the author apparently thinks C is defined in terms of the sizes of types that happen to be on his implementation. To say "a string is declared as an array of characters" is to imply that any array of characters is a string, and of course the criteria for a string includes being null terminated. There are numerous other occurrences throughout the article of the author assuming certain implementation defined values and asserting they are always those values.••••An int is a 4-byte integer value. A float is a 4-byte floating point value. A char is a 1-byte single character (like "a" or "3"). A string is declared as an array of characters.
There are a number of derivative types:
double (8-byte floating point value)
short (2-byte integer)
unsigned short or unsigned int (positive integers, no sign bit) - Mostly main will be correctly defined to return int, but sometimes the good old horrible "void main" pops up.
- Uses gets() without explaining that it's harmful, let alone why. Uses fgets() later, but doesn't mention using it instead of gets().
- casts the return value of malloc. This is a controversial issue.
- Uses the term "pointer to array" when referring to an a pointer to the first element of the array. This example demonstrates the difference:
C Syntax (Toggle Plain Text)- int a[42];
- int *p = a; /* p is a pointer to a[0] */
- int (*q)[42] = &a; /* q is a pointer to the [entire] array */
- For scanf, it says you "MUST put & in front of the variable used in scanf" but of course this would be wrong for %s, and it doesn't cover this or why.
If I'm accused of nitpicking, I certainly didn't have much trouble finding errors. Every page I looked at seems to have something dubious on it. You might also argue that the above issues are technicalities and beyond the scope of a beginner's C tutorial. This well may be the case, but then perhaps there should be some footnotes explaining this. It doesn't excuse it, and I'm sure I could produce another 10-20 examples if I had the time.
•
•
Join Date: Sep 2009
Posts: 3
Reputation:
Solved Threads: 0
Hi...
I read your post.It is really wonderful.The links that you provided are very nice and useful.With the help of this it becomes very easy to work with C.Many of your C tutorials help to solve programming errors and functions.Thanks for the information...
I read your post.It is really wonderful.The links that you provided are very nice and useful.With the help of this it becomes very easy to work with C.Many of your C tutorials help to solve programming errors and functions.Thanks for the information...
•
•
•
•
Based on the request by Mr. Jamshid i thought why not just start the useful links and tutorials for novice C programmers so they dont have to do a lot of GOOGLE like the one present in Python Forums.
If the moderators like the concept here they can sticky this or delete this post if they dont like it.
If this thread manages to stay, anyone intrested can post any important links or resources they know of and can start a new thread if they have any doubts.
List of free compilers and IDE
1) Codeblocks IDE integrated with MINGW compiler can be downloaded at http://www.codeblocks.org/downloads.shtml
2) Bloodshed Dev C++ IDE with MINGW port of GCC as its compiler at http://www.bloodshed.net/devcpp.html
3) Visual Studio Express Edition
4) Pelles C IDE
List of Tutorials
C programming tutorials 4th edition
http://www.iu.hio.no/~mark/CTutorial/CTutorial.html#Preface
C standard function reference
http://www.cppreference.com
http://www.utas.edu.au/infosys/info/....html#Contents
Excellent site for free compilers, libraries, tutorials etc.
http://www.thefreecountry.com/docume...ferences.shtml
C programming Notes
http://www.eskimo.com/~scs/cclass/notes/sx1.html
Programmign in C
http://www.scit.wlv.ac.uk/~jphb/cbook/html/
Excellent site a must see for all newbies
http://www.cprogramming.com/tutorial.html
http://www.physics.drexel.edu/course..._tutorial.html
Link to many programming tutorials
http://www.programmingtutorials.com/c.aspx
http://www.freeprogrammingresources.com/ctutor.html
http://www.tutorialized.com/tutorials/C-and-Cpp/1
http://www.techtutorials.info/cgen.html
http://www.intelligentedu.com/newly_...raining/C.html
http://www.cyberdiem.com/vin/tutorials.html
Pointer and other topic specific resources
http://pweb.netcom.com/~tjensen/ptr/cpoint.htm
http://www.augustcouncil.com/~tgibson/tutorial/
http://www.newty.de/fpt/index.html
Advice and warnings for C
http://www.brainbell.com/tutors/c/Ad...arnings_for_C/
Interfacing ODBC and C
http://www.physics.drexel.edu/course..._tutorial.html
Waiting for the feedback of all the members and would be really happy if you would carry on adding more links to this thread so that a newbie would not have to search a lot on the net regarding how to start on C.
Regards
~s.o.s~
following site is not accessible its showing no authorization
Interfacing ODBC and C
http://www.physics.drexel.edu/course..._tutorial.html
i am plannig to add few more sites here, just checking what are all present here to avoid repetition.
Minds are like parachutes - they only work when they are open
Gaiety
Gaiety
![]() |
Similar Threads
- System 32 at startup and "dwn"/"down" pop up at startup (Viruses, Spyware and other Nasties)
- red circle with white "x" ??? help (Viruses, Spyware and other Nasties)
- google "keyword" question (Search Engine Optimization)
- What Do You Do When You Can't "See" It? (Viruses, Spyware and other Nasties)
- "MiCr0s0ft.exe", "Microsoftx.exe" & "ns.exe" viruses?Please Help (Viruses, Spyware and other Nasties)
- Transferring "C" Drive to new drive? (Windows NT / 2000 / XP)
- loop in main function to an "if" statement (C++)
Other Threads in the C Forum
- Previous Thread: Scheduler
- Next Thread: Please help. Memory Management Error
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h






