ISS (Statistical Services) Statistics Paper I (New 2016 MCQ Pattern): Questions 115 - 118 of 472

Access detailed explanations (illustrated with images and videos) to 472 questions. Access all new questions- tracking exam pattern and syllabus. View the complete topic-wise distribution of questions. Unlimited Access, Unlimited Time, on Unlimited Devices!

View Sample Explanation or View Features.

Rs. 300.00 -OR-

How to register? Already Subscribed?

Question 115

Question

MCQ▾

What is the output of this C code?

  1. #include<stdio.h>
  2. intmain()
  3. {
  4.     intx = 1, y = 1;
  5.     while (x < 2)
  6.     {
  7.         p1: x++;
  8.         while (y < 3)
  9.         {
  10.             printf("loopn");
  11.             gotop1;
  12.         }
  13.     }
  14. }

Choices

Choice (4)Response

a.

Compilation error

b.

loop loop loop

c.

loop loop

d.

Infinite loop

Question 116

Question

MCQ▾

Let P be a square matrix of size n x n. Consider the following program. What is the expected

  1. C = 100
  2. fori = 1tondo
  3. forj = 1tondo
  4. {
  5.     Temp = P[i][j] + C
  6.     P[i][j] = P[j][i]
  7.     P[j][i] = Temp - C
  8. }
  9. fori = 1tondo
  10. forj = 1tondo
  11. Output(P[i][j]);

output?

Choices

Choice (4)Response

a.

Transpose of matrix P

b.

The matrix P itself

c.

Adding 100 to the upper diagonal elements and subtracting 100 from diagonal elements of P

d.

All of the above

Question 117

Question

MCQ▾

Which for loop has range of similar indexes of ‘i’ used in for (i = 1; i < n; i ++) ?

Choices

Choice (4)Response

a.

for (i = n; i > 0; i –)

b.

for (i = n; i >= 0; i –)

c.

for (i = n-2; i >-1; i –)

d.

for (i = n-1; i > 0; i –)

Question 118

Question

MCQ▾

Which of the following correctly accesses the sixth element stored in A, an array with 50 elements?

Choices

Choice (4)Response

a.

A [6]

b.

A [5]

c.

A {6}

d.

A {5}