Final Adiee C Project
Final Adiee C Project
For
Micro Projects
Maharashtra state
SR.
Name of
NO. Details of activity Planned Planned responsible
start date finish date Team
members
1
Formation of group and
All
Allocation of project title 10/01/2024 17/01/2024
members
2
Information search and
11/01/2024 17/01/2024
required analysis
3
Collection of data
with team members 18/01/2024 24/01/2024
All
4 members
Verify project by subject
teacher 08/02/2024 14/02/2024
5
Approval of Project 21/02/2024 28/02/2024
6 All
Submission of project 25/03/2024 30/03/2024
members
5.0) Actual resources used :-
1. window7,RAM 16 GB, 1
Laptop s 11 pro
2. 1
Development software Turbo C++ 3.2
3. 1
Notepad Version 11.2401.26.0
4. 1
Reference books Books of C programming
5. -
Internet Browser
Part B
2.0) Rationale :-
developing a quiz game in C provides an engaging and
versatile project opportunity that fosters learning, skill development,
and community contribution.Quiz games are inherently engaging and
enjoyable for users. They encourage participation and interaction,
making them a popular choice among both developers and players.
5.0) Introduction :-
#include <stdio.h>
#include <string.h>
int main()
{
char *subjectNames[] = {"Mathematics", "Programming In C",
"Basic Electrical and Electronics"};
printf("Choose a subject:\n");
for (int i = 0; i < 3; i++)
{
printf("%d. %s\n", i + 1, subjectNames[i]);
}
int choice;
printf("Enter your choice (1-3): ");
scanf("%d", &choice);
char *options[3][4][4] = {
{{"Aryabhatta", "Archimedes", "John Walls", "Alan Turing"},
{"May 27", "February 24", "Jully 4", "March 14"},
{"Acute Angles", "Reflex Angles", "Obtuse Angle", "Right
Angle"},
{"Albert Einstein", "Katherine Johnson", "Robert Recorde",
"Harish Chandra"}},
int correctAnswers[3][4] = {
{1, 4, 2, 3},
{3, 4, 1, 2},
{2, 1, 2, 1}};
int cScores = 0;
// Loop for each question in the C Programming quiz
for (int i = 0; i < 4; i++)
{
int result = askQuestion("Programming In C", cQuestions[i],
cOptions[i], cCorrectAnswers[i]);
cScores += result;
}
printf("\nProgramming In C Quiz Completed!\n");
printf("Score: %d out of 4\n", cScores);
}
else if (continueChoice == 'B' || continueChoice == 'b')
{
// Continue with BEE quiz
// Add the logic for BEE questions here
}
else
{
printf("Invalid choice. Exiting...\n");
}
return 0;
}
int askQuestion(char *subject, char *question, char *options[], int
correctOption)
{
int answer;
printf("\n%s Quiz: %s\n", subject, question);
for (int i = 0; i < 4; i++)
{
printf("%d. %s\n", i + 1, options[i]);
}
printf("Enter your answer (1-4): ");
scanf("%d", &answer);
if (answer == correctOption)
{
printf("Correct!\n");
return 1; // Correct answer
}
else
{
printf("Incorrect!\n");
return 0; // Incorrect answer
}
}
Output :-
Output :-
Algorithm of Quiz Game :-
1. Start
2. Print menu for subject selection
3. Read user's choice
4. If choice is invalid, print error message and exit
5. Subtract 1 from choice to match array index
6. Loop through each question for the selected subject
7. Ask the question and options
8. Read user's answer
9. If answer is correct, print "Correct!" and increment score
10. If answer is incorrect, print "Incorrect!"
11. Repeat steps 6-10 for all questions
12. Print subject quiz completed message and score
13. Ask user if they want to continue with C Programming or
Basic Electrical and Electronics
14. If choice is C, loop through C Programming quiz
questions
15. Ask question and options for C Programming quiz
16. Read user's answer
17. If answer is correct, print "Correct!" and increment score
18. If answer is incorrect, print "Incorrect!"
19. Repeat steps 14-18 for all C Programming questions
20. Print C Programming quiz completed message and score
21. If choice is B, add logic for Basic Electrical and
Electronics quiz
22. If choice is invalid, print error message and exit
23. End
Advantages of Quiz Game :-
www.geeksforgeeks.org
www.github.com
www.tutorialspoint.com
www.codeproject.com
Conclusion :-