Computer Programming (3310701) MCQs

MCQs of Introduction of Array (One Dimensional)

Showing 31 to 34 out of 34 Questions
31.

What happens when you try to access an array variable outside its size?

જ્યારે તમે કોઈ એરે વેરીએબલ ને તેની સાઈઝ ની બહાર એક્સેસ કરવાનો પ્રયાસ કરો ત્યારે શું થાય છે?

(a)

Compiler error

(b)

1 value will be returned

(c)

0 value will be returned

(d)

Some garbage value will be returned

Answer:

Option (d)

32.

Smallest element of an array is called as _____________ . 

એરે નો સ્મોલેસ્ટ એલિમેન્ટ ________ કહેવાય છે.

(a)

Range

(b)

Lower bound

(c)

Upper bound

(d)

Middle bound

Answer:

Option (b)

33.

Consider the array definition 

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

select right option

એરે ની ડેફિનેશન consider કરો

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

સાચો ઓપ્શન સિલેક્ટ કરો.

(a)

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

 num એરે નો num[9] એ લાસ્ટ એલીમેન્ટ હશે

(b)

the value of num[8] is 3 

num[8] ની વેલ્યુ 3 હશે

(c)

the value of num[3] is 3

num[3] ની વેલ્યુ 3 હશે

Answer:

Option (a)

34.

Array is an example of _________ type memory allocation.

એરે _________ ટાઈપના મેમરી એલોકેશન નું ઉદાહરણ છે.

(a)

Compile Time

(b)

Run Time

Answer:

Option (a)

Showing 31 to 34 out of 34 Questions