Question: Need to randomize these three questions WITHOUT using loops. Use srand ( ) and rand ( ) functions and % ( mod) operator to get

Need to randomize these three questions WITHOUT using loops. Use srand (Need to randomize these three questions WITHOUT using loops. Use srand ( ) and rand ( ) functions and % ( mod) operator to get random number. Order should be different each time you run the program

#include #define QUESTION_1 {\ printf ("What is USA stands for "); printf ("1. United States of America "); \ printf ("2. United Stand Always "); printf ("3. United South Africa "); \ printf ( "4. United State Employees "); \ scanf ( "Chhu", &answer); \ if ( answer 1) I score++; #define QUESTION_2 {\ printf ( "Where is USA "); \ printf ("1. Above Canada "); printf ("2. Below Canada "); \ printf ("3. Below Mexico "); \ printf ( "4. Next to Texas "); \ scanf ( "Chu", &answer); \ if ( answer == 2) score++; } #define QUESTION_3 {\ printf ("Where is Canada "); printf ("1. Below USA "); printf ("2. Next to Australia "); printf ("3. Below Mexico "); printf ("4. Above USA "); scanf ( "Chhu", &answer); if ( answer == 4) score++; } int main ( { unsigned char score = 0; unsigned char answer; QUESTION 1; QUESTION 2; QUESTION 3; printf ("Thank you for completing the Quiz. Your score=%d ", score ); return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To randomize the order of three questions without using loops using srand rand and operator we can s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!