virtual-labs-archive / problem-solving-iiith

Other
4 stars 437 forks source link

Factorials_Quizzes #865

Open vinaykumartadepall opened 5 years ago

vinaykumartadepall commented 5 years ago

Defect Description : One of the possible answer is treated as a wrong response for question 10.

Steps to reproduce the issue : problem solving lab->Numerical representation->Quizzes.

Expected Result : The code given in option b ( for( int i =1; i < 10 ; i--) printf("Hello World"); ) isn't an infinite loop because the program execution stops after some time because when the value of i reaches it's minimum possible value i.e; -2^31 , data overflow occurs and results in a positive value i.e; 2^31-1. And now it checks weather it is less than 10 or not, and as it is not less than 10, the loop should break and program stops execution. So it is not an infinite loop. So option b is also a correct option and should be treated as a correct response.

Actual result : Option b is treated as a wrong response.

Screenshot (3) Screenshot (4)

bhavesh01shukla commented 5 years ago

commit id: 6aa7f0f