Top

Arrays

11.

Under which of the following conditions, the size of an one-dimensional array need not be specified?

Answer: D

No answer description available for this question.

Enter details here

12.

Predict the output of below code:

#include

int main()
{
    int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 1, 7, 8, 9, 0};
    printf("%u, %u\n", a+1, &a+1);
    return 0;
}

 

Answer: C

No answer description available for this question.

Enter details here

Answer: D

No answer description available for this question.

Enter details here

14.

If S is an array of 80 characters, then the value assigned to S through the statement scanf("%s",S) with input 12345 would be

Answer: A

No answer description available for this question.

Enter details here

15.

Consider a two dimensional array A[20][10]. Assume 4 words per memory cell, the base address of array A is 100, elements are stored in row-major order and first element is A[0][0]. What is the address of A[11][5] ?

Answer: A

No answer description available for this question.

Enter details here

16.

C does no automatic array bound checking. This is

Answer: D

C does no array bound checking. Because of this, one can access fifth clement of an array that is declared to he of lesser size.

Enter details here

Answer: C

No answer description available for this question.

Enter details here

Answer: A

No answer description available for this question.

Enter details here

19.

Consider the statement

int val[2] [4] = { 1, 2, 3, 4, 5, 6, 7, 8} ;

4 will be the value of

Answer: A

No answer description available for this question.

Enter details here

20.

Let A[1...n] be an array of n distinct numbers. If i < j> A[j], then the pair (i, j) is called an inversion of A. What is the expected number of inversions in any permutation on n elements ?

Answer: B

No answer description available for this question.

Enter details here

Loading…
Tags: Arrays Questions and Answers || Arrays MCQ Questions and Answers || Arrays GK Questions and Answers || Arrays GK MCQ Questions || Arrays Multiple Choice Questions and Answers || Arrays GK || GK on Arrays || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming