Thread: need Exercice on Functions in C

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    1

    Cool need Exercice on Functions in C

    hi I am new in these forum and i need some exercices with sollution of Functions in C,I prefer books if its possible
    thn you so much

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    This is a sticky thread on the main page of the C forum: C Book Recommendations. More books that you could ever need. Also, there are lots of free online resources for this. Google for "function tutorials C" or "function exercises C". That should give you plenty to work on.

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Quote Originally Posted by Dr.Vip View Post
    hi I am new in these forum and i need some exercices with sollution of Functions in C,I prefer books if its possible
    thn you so much
    While occasionally having a book can be helpful for reference, it's sometimes best to just play around with a compiler and learn for yourself. It's not always best to constrain your learning based on someone else's work.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by memcpy View Post
    While occasionally having a book can be helpful for reference, it's sometimes best to just play around with a compiler and learn for yourself. It's not always best to constrain your learning based on someone else's work.
    With something as complex as C and it's libraries you can "play around with a compiler" for a couple of decades and acquire nothing but bad habits and piles of partially functional code. There are concepts set forth in books and tutorials you will *never* blunder onto by yourself. There are pitfalls explained that you will fall into constantly without even realizing their dangers... There are some things you just have to be *told*.

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Dr.Vip View Post
    hi I am new in these forum and i need some exercices with sollution of Functions in C,I prefer books if its possible
    thn you so much
    The C Book - Table of Contents

    Functions are the 2nd part of the 1st chapter.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  6. #6
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Quote Originally Posted by CommonTater View Post
    With something as complex as C and it's libraries you can "play around with a compiler" for a couple of decades and acquire nothing but bad habits and piles of partially functional code. There are concepts set forth in books and tutorials you will *never* blunder onto by yourself. There are pitfalls explained that you will fall into constantly without even realizing their dangers... There are some things you just have to be *told*.
    I specifically said "occasionally" and "not always" to avoid this kind of comment.. also playing around with a compiler and/or source code will​ teach you a lot.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by memcpy View Post
    I specifically said "occasionally" and "not always" to avoid this kind of comment.. also playing around with a compiler and/or source code will​ teach you a lot.
    Yes it will... but it won't make a programmer out of you. At best it makes you a hack (as opposed to hacker).

    I'm self-educated, started in BASIC back in the z-80 days, moved to Pascal when I started on PCs... now C after Borland killed Pascal. 20 years after beginning programming, I went the "start from scratch" route with C, just like I did with Pascal... grab a good book and start reading...

    If you think you can learn C without some sort of guidance, just take a look at your own message history and notice how often you've posted totally bogus ideas --like SEH just being some clever if/else stuff-- and been corrected by others. You may know programming syntax from your playing around but I don't see a lot of evidence you know anything about programming itself.

    Knowing all the words to a language is useless unless you also know the grammar.

  8. #8
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Quote Originally Posted by CommonTater View Post
    --like SEH just being some clever if/else stuff--
    That's a terrible example - you can't learn that from reading C books anyway, or at least the ones designed for *nix based machines.

    Quote Originally Posted by CommonTater View Post
    I don't see a lot of evidence you know anything about programming itself.
    You really can't make such a broad claim based off of 93 posts, not to mention that you're implying that almost everything I say is wrong and uninformed (which isn't true). The only 'true' ways to judge this about a person would be to (either) examine what they've written and its source, or watch them for a longer period of time on a forum and see how much they actually know or don't know.

    Also, (as you said), programming is useless if all you know is syntax, but I still fail to see your distinction of "programming itself."

  9. #9
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by memcpy View Post
    That's a terrible example - you can't learn that from reading C books anyway, or at least the ones designed for *nix based machines.
    Because Posix systems don't use SEH.

    You really can't make such a broad claim based off of 93 posts, not to mention that you're implying that almost everything I say is wrong and uninformed (which isn't true). The only 'true' ways to judge this about a person would be to (either) examine what they've written and its source, or watch them for a longer period of time on a forum and see how much they actually know or don't know.

    Also, (as you said), programming is useless if all you know is syntax, but I still fail to see your distinction of "programming itself."
    Maybe the brush was a bit too wide... but the point remains. Programmers who don't conduct deliberate studies of programming and it's techniques, almost always end up in the "Skript Kiddie" bin because, while they may know all the right syntax they know nothing about programming.

    Programming is a distinct entity, separate from writing source code. In fact "coding" is actually a very small part of the skillset. The primary skills are analytical --understanding the problem, troubleshooting errors, etc.-- not syntactical. For example: Knowing how to write a multithreaded program is pointless if you don't know *when* to write a multithreaded program. As I've said here, so often it's become a "groaner": No programmer has ever successfully written a solution to a problem he does not understand.

    Beyond the basic skills are advanced techniques --like SEH-- that are necessary to write commercial quality code but not part of the "Whatever for Dummies" books. A programmer who's not spending time "keeping up" by reading technical papers and advanced journals isn't going to stay in the market very long. (Why do you think there's this big ongoing grumble here about those awful universities in India still teaching Turbo C for DOS?)

    Sure thing, grab a compiler and mess with it... have fun.
    But don't fool yourself into thinking that knowing how to write a clever for() loop makes you anything even vaguely resembling a programmer.

    For your comment about the forums... I\m pretty sure most here can usually tell, almost right away, if someone has some skills or not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help for a programming exercice
    By thibault0613 in forum C# Programming
    Replies: 4
    Last Post: 11-12-2011, 07:38 PM
  2. help for my programming exercice
    By thibault0613 in forum C# Programming
    Replies: 5
    Last Post: 11-09-2011, 01:52 PM
  3. Creating Functions & passing information to other functions
    By RyanLeonard in forum C Programming
    Replies: 4
    Last Post: 10-28-2010, 12:17 PM
  4. Replies: 6
    Last Post: 05-06-2003, 03:08 PM
  5. Replies: 1
    Last Post: 01-20-2002, 11:50 AM