Tuesday, June 21, 2011

Mini project Quiz in C

Welcome to the Mini Project Quiz in C! This article is about creating a simple quiz game in the C programming language. The target readers of this article are students and absolute beginner C programmers. If you are an experienced C programmer then it is not for you.

You will learn to break down an application into modules (functions), switch between screens based on user input, multi-dimensional array techniques, loops and so much more.

Like in other sample mini-projects, I have not used a file handling system to store information to make it simple and easy to understand basic techniques.
After finishing this article, you will:

  • Truly understand how to break down the application and create a flow chart.
  • Be able to convert the flow chart processes into C functions.
  • Learn techniques to switch between processes based on user input. 
  • Have mastered the usages of multi-dimensional C arrays and loops.


You can download the final version of the application from GitHub Download from Github.

I have divided this article into 3 parts:
Part 1: Flow Chart and Main Menu: In this lesson, you will learn to create an application flow chart and create a welcome menu screen of the game.
Part 2: Multi-dimensional C array: In this lesson, you will understand techniques to create a function and switching between multiple functions as per user choice. You will master how to use one-dimensional, two-dimensional, and three-dimensional C arrays to store questions, question options, and answers. 
Part 3: Gameplay and the final score: You will learn to use a loop to display questions one by one, check the user's correct answer, and calculate the final score.

You can also watch a video about this project on YouTube.



33 comments:

  1. Very Nice, And Thank You Code in Code For Your Help

    ReplyDelete
  2. THANK YOU VERY MUCH.. THIS WOULD HELP IN MY PROJECT!... :D

    ReplyDelete
  3. hello please give me code or idea for bus reservation system in C.

    ReplyDelete
  4. Hey where is windows.h header file

    ReplyDelete
  5. See in c language there is no heder file name as windows.h if u remove that windows.h u get another one error in sleep so you also remove the sleep from coading means u get output successfully

    ReplyDelete
  6. Excellent Code sir. Helped me. spl thanx to sweety ammu detecting the flaw and debugging it.

    ReplyDelete
  7. what...iam gettn unable to form the output i.e, obj file

    ReplyDelete
  8. c language project in idea then topic please

    ReplyDelete
  9. Unable to open include file 'windows.h' what should i do ?

    ReplyDelete
  10. There is show 18 error's .
    Please Fix it !!!!!

    ReplyDelete
  11. how to no randomly question sir? i try it and no error, but i want that question no randomly.. sorry for my bad english

    ReplyDelete
  12. Excellent source code!!!! You did a great job bro!!! Thank you so much :) If you want you can leave me an email add to talk for further projects because I'm interested in further operations

    ReplyDelete
  13. wow... that's great ...!!!!!!!

    ReplyDelete
  14. thank you sir i pass my sybject with this code :3

    ReplyDelete
  15. can u modify it like when the user gives incorrect answer 1 is deduced from its score??

    ReplyDelete
  16. Sir,I'm getting tat sleep module error wat should I do plz say me...

    ReplyDelete
  17. hey does this run on turbo C.. and how will that sleep error be removed

    ReplyDelete
  18. Plz tell me how to insert,delete and modify questions in this program

    ReplyDelete
  19. Plz tell me how to insert,delete and modify questions in this program

    ReplyDelete
  20. its better to screenshots it is useful more readability

    ReplyDelete