SSC General Studies Quiz Program For 6 Participants
SSC General Studies Quiz Program For 6 Participants
% Question database
questions = { ...
'What is the capital of India?', 'New Delhi', 'Mumbai', 'Kolkata', 'Chennai', 1; ...
'Who was the first President of India?', 'Dr. Rajendra Prasad', 'Sardar Patel', 'Jawaharlal Nehru',
'Subhash Chandra Bose', 1; ...
'What is the national animal of India?', 'Lion', 'Tiger', 'Elephant', 'Peacock', 2; ...
'In which year did India gain independence?', '1945', '1946', '1947', '1948', 3; ...
'Who wrote the national anthem of India?', 'Rabindranath Tagore', 'Bankim Chandra Chatterjee',
'Sarojini Naidu', 'Subhash Chandra Bose', 1; ...
'Who is known as the Father of the Nation?', 'Jawaharlal Nehru', 'Subhash Chandra Bose', 'Mahatma
Gandhi', 'Bhagat Singh', 3; ...
'Which is the longest river in India?', 'Ganga', 'Yamuna', 'Brahmaputra', 'Indus', 1; ...
'Who invented the telephone?', 'Alexander Graham Bell', 'Thomas Edison', 'James Watt', 'Nikola Tesla',
1; ...
'Which planet is known as the Red Planet?', 'Earth', 'Mars', 'Jupiter', 'Venus', 2; ...
'The Great Wall of China was built to protect against?', 'Mongol invasions', 'Roman Empire', 'Japanese
attacks', 'Viking raids', 1; ...
'Which Indian state has the longest coastline?', 'Gujarat', 'Tamil Nadu', 'Maharashtra', 'Kerala', 1; ...
'Who discovered penicillin?', 'Alexander Fleming', 'Marie Curie', 'Louis Pasteur', 'Isaac Newton', 1; ...
'Who is known as the Iron Man of India?', 'Mahatma Gandhi', 'Jawaharlal Nehru', 'Sardar Patel',
'Subhash Chandra Bose', 3; ...
'Which city is known as the Silicon Valley of India?', 'Delhi', 'Hyderabad', 'Bangalore', 'Mumbai', 3; ...
'Which gas is most abundant in the earth''s atmosphere?', 'Oxygen', 'Nitrogen', 'Carbon Dioxide',
'Helium', 2; ...
'Which country is the largest producer of coffee?', 'Brazil', 'India', 'Colombia', 'Vietnam', 1; ...
'Who wrote the book "Discovery of India"?', 'Jawaharlal Nehru', 'Rabindranath Tagore', 'Mahatma
Gandhi', 'Sardar Patel', 1; ...
'What is the national flower of India?', 'Lotus', 'Rose', 'Lily', 'Marigold', 1; ...
'Which Mughal emperor built the Taj Mahal?', 'Akbar', 'Shah Jahan', 'Aurangzeb', 'Babur', 2; ...
'Who is the founder of Microsoft?', 'Steve Jobs', 'Larry Page', 'Bill Gates', 'Mark Zuckerberg', 3; ...
'In which year was the Battle of Plassey fought?', '1757', '1764', '1857', '1864', 1; ...
'Which is the largest desert in the world?', 'Sahara', 'Gobi', 'Thar', 'Kalahari', 1; ...
'Who invented the light bulb?', 'Nikola Tesla', 'Alexander Graham Bell', 'Thomas Edison', 'James Watt',
3 ...
};
% Number of participants
numParticipants = 6;
% Menu-Driven Program
while true
switch choice
case '1'
% Start Quiz
score = 0;
for i = 1:5
qIdx = shuffledIdx(i);
fprintf('1. %s\n2. %s\n3. %s\n4. %s\n', questions{qIdx, 2}, questions{qIdx, 3}, questions{qIdx,
4}, questions{qIdx, 5});
if answer == questions{qIdx, 6}
score = score + 1;
end
end
% Store participant's score
scores(participant) = score;
end
case '2'
% View Results
end
case '3'
% Exit Program
break;
otherwise
end
end