0% found this document useful (0 votes)
9 views4 pages

SSC General Studies Quiz Program For 6 Participants

Uploaded by

Gemini Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

SSC General Studies Quiz Program For 6 Participants

Uploaded by

Gemini Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

% 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 currency of Japan is?', 'Yen', 'Dollar', 'Euro', 'Pound', 1; ...

'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 is the author of Ramayana?', 'Valmiki', 'Vyasa', 'Kalidas', 'Tulsidas', 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 ...

};

% Total number of questions

numQuestions = size(questions, 1);

% Number of participants

numParticipants = 6;

% Scores for participants

scores = zeros(1, numParticipants);

% Menu-Driven Program

while true

disp('**** SSC General Studies Quiz ****');

disp('1. Start Quiz');

disp('2. View Results');


disp('3. Exit');

choice = input('Enter your choice: ', 's');

switch choice

case '1'

% Start Quiz

for participant = 1:numParticipants

fprintf('Participant %d:\n', participant);

score = 0;

% Shuffle questions for each participant

shuffledIdx = randperm(numQuestions, 5); % Each participant gets 5 questions

for i = 1:5

qIdx = shuffledIdx(i);

fprintf('%d. %s\n', i, questions{qIdx, 1});

fprintf('1. %s\n2. %s\n3. %s\n4. %s\n', questions{qIdx, 2}, questions{qIdx, 3}, questions{qIdx,
4}, questions{qIdx, 5});

answer = input('Your answer (1-4): ');

if answer == questions{qIdx, 6}

score = score + 1;

end

end
% Store participant's score

scores(participant) = score;

fprintf('Participant %d scored %d out of 5\n\n', participant, score);

end

case '2'

% View Results

disp('**** Quiz Results ****');

for participant = 1:numParticipants

fprintf('Participant %d: %d out of 5\n', participant, scores(participant));

end

case '3'

% Exit Program

disp('Exiting the quiz program...');

break;

otherwise

disp('Invalid choice! Please try again.');

end

end

You might also like