Tuesday, June 21, 2011

mini project "Quiz" in C

Welcome to "Mini Project Quiz in C"! This article is about creating a simple quiz game in the C programming language. Target readers of this article are students and absolute beginner C programmer. 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 my 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 array 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 to use one dimension, two dimensions and three-dimension C array to store questions, question options, and answer. 
Part 3: Gameplay and the final score: You will learn to use a loop to display questions one by one, check the user correct answer and calculate the final score.

34 comments:

  1. yeah a nice blog to read ..even though the contents are less it has got lot of useful information..I feel that you could have added information about .You can test your knowledge in html by attending HTML Quiz .

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

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

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

    ReplyDelete
  5. Hey where is windows.h header file

    ReplyDelete
  6. 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
  7. Excellent Code sir. Helped me. spl thanx to sweety ammu detecting the flaw and debugging it.

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

    ReplyDelete
  9. c language project in idea then topic please

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

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

    ReplyDelete
  12. 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
  13. 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
  14. wow... that's great ...!!!!!!!

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

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

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

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

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

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

    ReplyDelete
  21. What's the use of W? In na[W]

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

    ReplyDelete