Assignments or challenges

This is a discussion on Assignments or challenges within the C Programming forums, part of the General Programming Boards category; Hello all, I have been slowly teaching myself to program in C and have gone through a number of college-level ...

  1. #1
    Registered User Dogmasur's Avatar
    Join Date
    Jul 2008
    Posts
    72

    Assignments or challenges

    Hello all,

    I have been slowly teaching myself to program in C and have gone through a number of college-level homework assignments that I Googled online. Now I am having a hard time finding some new assignments to help me continue. I noticed the challenge section on the site hasn't been added to in awhile. Is anyone out there interested in putting out some more challenges or assignments for novice programmers like myself to work on? I can understand if no one is interested, just wanted to ask.
    "The art of living is more like wrestling than dancing." - Marcus Aurelius

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    What sort of challenge would you like [what concepts do you want to cover]?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User Dogmasur's Avatar
    Join Date
    Jul 2008
    Posts
    72
    Anything basic really. I am very new. Basically, when you learned C, how were you taught? Meaning, do you remember what kind of progression you were brought through? I think just about anything would be extremely helpful to me at this point. I am trying to get used to everything at once. Maybe writing a function to perform a task. I am still trying to feel more confident with that. I haven't played with structures yet and I don't think I am ready to.

    Thank you.
    "The art of living is more like wrestling than dancing." - Marcus Aurelius

  4. #4
    Registered User Dogmasur's Avatar
    Join Date
    Jul 2008
    Posts
    72
    Actually, while this is off topic, I thought of another question. Is it true that there is not a way to clear the screen that is accepted by ANSI? I read this in Greg Perry's Absolute Beginner's Guide to C 2nd edition which was written quite some time ago.

    If this in currently incorrect, how does one go about doing it?
    "The art of living is more like wrestling than dancing." - Marcus Aurelius

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Ok, so there's usually a couple of posts (at least) beginners posting more or less complete assignments here. Try solving a few of those.

    And yes, there is no portable way to clear the screen. I personally do not see it as necessary to clear the screen, so just not doing it is one option. The other option is to use a non-portable [that is, non-standard] library function. A third option is to call system("clear") [on Unix/Linux] or system("cls") [on windows]. All have their own benefits and drawbacks - the first method is what I normally use - being able to see what went on before I started the application is often "nice".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User Dogmasur's Avatar
    Join Date
    Jul 2008
    Posts
    72
    Ok, thank you. I have also been told Windows programming is rather difficult until you have a good grasp of the language. Is this true?
    "The art of living is more like wrestling than dancing." - Marcus Aurelius

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Dogmasur View Post
    Ok, thank you. I have also been told Windows programming is rather difficult until you have a good grasp of the language. Is this true?
    If by "Windows" you mean GUI, yes - that it is necessary to have a good grasp of pointers, address of, how types work (structs, enums, etc) and many other things. Also, even trivial Windows programs tend to be quite a few lines - so being able to work in a slightly larger set of source code is another key point for doing Windows programming.

    Keep to console programs.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    * noops's Avatar
    Join Date
    Jun 2008
    Posts
    108
    How about:

    Take in a string from the user like: This IS juST A stRING! 12369 )(&*

    Convert and print the string as:
    - All upper case
    - All lower case
    - 1st letter of each word upper case

    Don't use string.h

    You will probably want to make functions that will tell you if a character is upper or lower case (or neither, e.g. 1234 (*#9 etc.)
    And maybe a function to change the case of a character.

    I think this is a pretty good exercise.
    Last edited by noops; 08-19-2008 at 02:02 PM.

  9. #9
    Registered User Dogmasur's Avatar
    Join Date
    Jul 2008
    Posts
    72
    Beautiful and thank you. I'll get to work on this right away and see what I can come up with. No, I have not tried anything with structures yet.
    "The art of living is more like wrestling than dancing." - Marcus Aurelius

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,636
    If you do take noops' suggestion, remember to attempt a version that uses <string.h>. You could start by using <string.h>, in which case you may discover that all you actually need to do is implement certain standard library functions.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    > Now I am having a hard time finding some new assignments to help me continue.
    - Any number of homework questions here, just to see if you can solve them.

    - Actually helping out here, by posting answers to questions. If you can explain something to someone else, AND have that explanation stand up to scrutiny of others, then you're good.

    - Programming contests (google it)

    - Open source developments. No end of projects on the likes of sourceforge are always on the look-out for coders of all skills.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  12. #12
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    515
    Programming contests (google it)
    @Dogmasur
    www.topcoder.com/tc (But this is after you are comfortable with C and C++ and know how to use the Standard Template Library). For now, concentrate on the homework assignments posted on the board, there is no dearth of those. Try solving the exercises given in whatever book you are using to learn C.
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    But do not post the answer to the homework questions, whatever you do. We do not want to help cheaters.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lego Mindstorm challenges
    By BobMcGee123 in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-27-2008, 01:47 PM
  2. Replies: 3
    Last Post: 04-06-2007, 05:10 PM
  3. Program challenges
    By -Prime- in forum Tech Board
    Replies: 2
    Last Post: 10-15-2006, 03:26 PM
  4. C++ programming assignments and tests
    By NeoNite in forum C++ Programming
    Replies: 1
    Last Post: 06-05-2003, 05:41 AM
  5. Embedded assignments
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 08-28-2001, 10:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21