Top

Arrays

71.

Are the expressions arr and &arr same for an array of 10 integers?

Answer: B

No answer description available for this question.

Enter details here

72.

Predict the output of below code:

int main() 
{ 
    char a[2][3][3] = {'g','e','e','k','s','f','o', 
                           'r','g','e','e','k','s'}; 
    printf("%s ", **a); 
    getchar(); 
    return 0; 
} 

 

Answer: C

No answer description available for this question.

Enter details here

73.

Let x be an array. Which of the following are illegal

Answer: A

No answer description available for this question.

Enter details here

Answer: A

int arr[] = {1,2,3}; In this case size of array need not to be specified when initialization is a part of defination.

Enter details here

75.

What will be the output of the program if the array begins at 65472 and each integer occupies 2 bytes?

#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: B

No answer description available for this question.

Enter details here

76.

What will be the output of the program if the array begins 1200 in memory?

#include

int main()
{
    int arr[]={2, 3, 4, 1, 6};
    printf("%u, %u, %u\n", arr, &arr[0], &arr);
    return 0;
}

 

Answer: B

No answer description available for this question.

Enter details here

77.

Does this mentioning array name gives the base address in all the contexts?

Answer: B

No answer description available for this question.

Enter details here

Answer: D

No answer description available for this question.

Enter details here

79.

What will be the address of the arr[2][3] if arr is a 2-D long array of 4 rows and 5 columns and starting address of the array is 2000?

Answer: C

2000 + 4*(5*2) + 3*4 

Enter details here

80.

Which of the following is a correct way to declare a multidimensional array in Java?

Answer: C

The syntax to declare multidimensional array in java is either int[][] arr; or int arr[][];

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