Top

Arrays

51.

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

52.

What is the output of C program with arrays?

int main() 
{ 
int a[3] = {20,30,40}; 
int b[3]; 
b=a; 
printf("%d", b[0]); 
}

 

Answer: A

No answer description available for this question.

Enter details here

Answer: B

No answer description available for this question.

Enter details here

54.

In general, the index of the first element in an array is __________

Answer:

Enter details here

55.

What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?

Answer: C

No answer description available for this question.

Enter details here

56.

A string that is a formal parameter can be declared

Answer: C

A string that is a formal parameter can be declared by both A and B.

Enter details here

57.

What will be the output of the program ?

#include

int main()
{
    static int arr[] = {0, 1, 2, 3, 4};
    int *p[] = {arr, arr+1, arr+2, arr+3, arr+4};
    int **ptr=p;
    ptr++;
    printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);
    *ptr++;
    printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);
    *++ptr;
    printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);
    ++*ptr;
    printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);
    return 0;
}

 

Answer: C

No answer description available for this question.

Enter details here

58.

Below is an example of -

int RollNum[30][4];

 

Answer: B

No answer description available for this question.

Enter details here

59.

Which of the following correctly declares an array?

Answer: A

No answer description available for this question.

Enter details here

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