Computer Programming (3310701) MCQs

MCQs of Introduction of Array (One Dimensional)

Showing 21 to 30 out of 34 Questions
21.

What is meaning of following declaration?

int arr[20];

નીચેના ડીક્લેરેશન નો મીનિંગ શું છે?

int arr[20];

(a)

Array of address 20

(b)

arr contains 20 value

(c)

Address 20

(d)

Integer array of size 20

Answer:

Option (d)

22.

Size of int is 4 bytes, what is the size of int arr[15];?

int ની સાઈઝ 4 બાઇટ્સ છે, તો int arr[15]; ની સાઈઝ શું હશે?

(a)

15

(b)

60

(c)

45

(d)

30

Answer:

Option (b)

23.

Array with last element 'n' will always have array size equal to _______.

Last એલિમેન્ટ 'n' વાળા એરે ની સાઈઝ હંમેશા _________ હોય છે.

(a)

n

(b)

n+n

(c)

n-1

(d)

n+1

Answer:

Option (d)

24.

Array is _______ data type in C programming language.

C પ્રોગ્રામિંગ લેન્ગવેજ માં એરે એ _______ ડેટા ટાઈપ છે.

(a)

Derived

(b)

Custom

(c)

Primitive

Answer:

Option (a)

25.

If we have declared an array described below -

int arr[6];
then which of the following array element is considered as last array element ?

જો આપણે નીચે પ્રમાણે એરે ડિક્લેર કરેલો હોય

int arr[6];

તો આપેલા માંથી ક્યુ એરે એલિમેન્ટ last એરે એલિમેન્ટ તરીકે કન્સિડર થાય?

(a)

arr[6]

(b)

arr[5]

(c)

arr[0]

(d)

arr[4]

Answer:

Option (b)

26.

Consider the array definition
int num [10] =  {3, 3, 3};
Pick the Correct answer

int num [10] =  {3, 3, 3};

આપેલ એરે ડેફિનેશન માટે સાચો answer સિલેક્ટ કરો.

(a)

num [9] is the last element of the array num

(b)

The value of num [ 3 ] is 3

(c)

The value of num [ 8 ] is 3

Answer:

Option (a)

27.

If arr is a two dimensional array of 10 rows and 12 columns, then arr (5) logically points to the

જો arr 10 રો અને 12 કોલમ નો ટુ-ડાઈમેન્સનલ એરે હોય, તો પછી arr[5][0] લોજીકલી શું દર્શાવે છે?

(a)

sixth row

(b)

Fifth row

(c)

fifth column

(d)

sixth column

Answer:

Option (a)

28.

How do you initialize an array in C?

તમે C માં કેવી રીતે એરે ને ઇનિશિયલાઈઝ કરી શકો?

(a)

int arr[4]=(1,2,3,4);

(b)

int arr(4)={1,2,3,4};

(c)

int arr[4]={1,2,3,4};

(d)

int arr(4)=(1,2,3,4);

Answer:

Option (c)

29.

The index of the first element in an array is _________ .

એરેમાં ફર્સ્ટ એલિમેન્ટ ની ઈન્ડેક્સ _________ છે.

(a)

0

(b)

-1

(c)

1

(d)

2

Answer:

Option (a)

30.

What is the output of this C code?

void main()
{
      int a[3]={3,4,5};
      printf("%d",a[1]);
}

આપેલા C કોડનું આઉટપુટ શું હશે?

void main()
{
      int a[3]={3,4,5};
      printf("%d",a[1]);
}

(a)

5

(b)

3

(c)

4

(d)

0

Answer:

Option (c)

Showing 21 to 30 out of 34 Questions