GATEverse
← GATE CSE 2007

Q51

MCQ2 marks, −0.5

Consider the following C program segment: int IsPrime (n) { int i, n; for (i=2; i<=sqrt(n);i++) if(n%i == 0) {printf("Not Prime \n"); return 0;} return 1; } Let T(n)T(n) denote number of times the forfor loop is executed by the program on input nn. Which of the following is TRUE?

Sign in to save attempts.

Loading…