Consider the following C program #include < stdio.h > int main(){ int a = 6; int b = 0; while(a < 10) { a = a / 12 + 1; a += b;} printf("%d", a); return 0;} Which one of the following statements is CORRECT?
Asked in GPSC Assistant Director (IT), Class-1 2025
Answer under review: our editors are checking this question. Try the other GPSC Prelims previous year questions questions meanwhile.
More GPSC Prelims previous year questions questions
- If n has 3, then the statement a[++n]=n++;
- Assume A and B are non-zero positive integers. The following code segment while(A!=B){ if(A > B) A – = B; else B – = A; } cout << A; // printing the value of A
- Consider the following program fragment if(a > b) if(b > c) s1; else s2; s2 will be executed if
- What does the following algorithm approximate? (Assume m>1,e>0) x = m; y = 1; while (x – y > e) { x = (x + y)/2; y = m/x; } print(x);
- We use malloc and calloc for
- If an array A contains the items 10, 4, 7, 23, 67, 12 and 5, in that order, what will be the resultant array A after third pass of insertion sort?
- A one-dimensional array A has indices 1....75. Each element is a string and takes up three memory words. The array is stored at location 1120 decimal. The starting address of A[49] is
- Consider an unordered list of N distinct integers. What is the minimum number of element comparisons required to find an integer that is NOT the largest in the list?