Thread: Looking for example C problems...

  1. #1
    Registered User
    Join Date
    Sep 2015
    Posts
    5

    Looking for example C problems...

    I am preparing for the final exam(introduction to C) and looking for some example problems that probably i am going to encounter in the exam...i have searched in google but couldn't find much...

    thanks in advance...

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Hang around/look back on the archive of the C forum. People post homework questions everyday; make your own attempts to code a solution. That gives you practice for the exam. You can find material for just about any subject here

  3. #3
    Registered User
    Join Date
    Dec 2015
    Posts
    34
    Hi, I'm currently studying at Uni a BICT (bachelors of Information Communication and Technology) and am majoring in software-development. I don't know how far you're in to your studies, but let me offer you some advice.

    Typically, there is a single semester to learn the basics of a unit (normally 13 weeks), the only stuff that will appear on an exam is stuff you've covered.

    I would strongly recommend focusing only on lecture slides and assignments.

    I mention this because your exam will be based on what youíve covered. C has a lot of aspects to it, itís doubtful youíve been taught all the aspects in 13 weeks in a single unit.

    The best thing to do, is to look up past exam papers and base what you should learn off that. Normally past exam papers are available through your school library. Iíd suggest getting your hands on as many as you can and go through them. highlight the questions you struggle with go back over your unit content to find answers.


  4. #4
    Registered User
    Join Date
    Dec 2015
    Posts
    1
    Hi fellows..
    it is proposed to create a calendar where we have to insert, edit, remove and other random functions that a calendar has.
    I am using Codeblocks and have 3 tabs for the project: main.c, calendar.c and calendar.h, and my problem is:
    - i have declared global variables on the tab main and I need that variables on the calendar.c so it says that are undeclared;
    - if I cut the variables and paste on the calendar.h, the main.c says that I have redeclared because I define the #include "calendar.h" on top of main.c..

    any suggestion?

    tks

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,493
    Quote Originally Posted by Snitram_15
    any suggestion?
    Don't use global variables: make appropriate use of function parameters. While you could reasonably have a calendar struct object that is global, to develop your skills with working without global variables as a crutch, declare it local to the main function instead.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User
    Join Date
    Dec 2015
    Posts
    6
    You can find some exercises at Eulers Project website although they are maths+programming problems.

  7. #7
    Registered User
    Join Date
    Sep 2015
    Posts
    5
    Quote Originally Posted by laserlight View Post
    Don't use global variables: make appropriate use of function parameters. While you could reasonably have a calendar struct object that is global, to develop your skills with working without global variables as a crutch, declare it local to the main function instead.
    hello laserlight...you seem very experienced on c programming...i am sure you can help me...i am studying from ''c: how to program''...but the exercises in the end of the chapters is not enough...i am really in need of doing more practice to pass the exam which i am going to take next week...can you please direct me to the websites which contain programming problems and its solutions...or do you have your own archive to send me...?

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    4,509
    For starters, there are practice problems on the main site here: C/C++ Programming Practice Problems - Cprogramming.com

    There are many threads here asking about practice problems - here's one: Where to find practice problems for C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fread problems or memory problems
    By Lechuza in forum C Programming
    Replies: 1
    Last Post: 03-22-2009, 12:45 PM
  2. Linking problems, class problems
    By Kheila in forum C++ Programming
    Replies: 12
    Last Post: 11-22-2005, 01:47 AM
  3. Problems w/ Dev C++
    By Callith in forum Tech Board
    Replies: 8
    Last Post: 11-26-2004, 06:30 AM
  4. avi problems
    By dP munky in forum Tech Board
    Replies: 3
    Last Post: 05-06-2003, 08:27 PM
  5. ICS problems
    By lambs4 in forum Tech Board
    Replies: 4
    Last Post: 12-02-2002, 11:01 AM