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?
#include <stdio.h>
int main()
{
int x = 1, y = 1;
while (x < 2)
{
p1: x++;
while (y < 3)
{
printf("loopn");
goto p1;
}
}
}
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
C = 100
for i = 1 to n do
for j = 1 to n do
{
Temp = P[i][j] + C
P[i][j] = P[j][i]
P[j][i] = Temp - C
}
for i = 1 to n do
for j = 1 to n do
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} |