ISRO Scientist or Engineer Computer Science 2018 Question 6

Question 6

Consider the following C code segment:
#include <stdio.h>
main()
{
int i, j, x;
scanf("%d", &x);
i = 1; j = 1;
while(1 < 10){
j = j * i;
i = i + 1;
if(i == x)break;
}

}
For the program fragment above, which of the following statements about the variables i and j must be true after execution of this program? [ !(exclamation) sign denotes factorial in the answer ]



Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

Comments

Register with

OR

Boost your Prep!

Download App