Search This Blog

Sunday, April 26, 2015

1-D Arrays Bits


1. Array is a group of _______ data types
A similar
B different
C both a and b
D none
 ANSWER  A                    

2. Array Size is
A 0 to n
B 0 to n-1
C both a and b
D none
 ANSWER  B                   

3. int a[5] index values are
A a[0] to a[4]
B a[1] to a[5]
C both a and b
D none
 ANSWER  A                   

4. int a[5] then memory allocated for a is
A 20
B 5
C 10
D none
 ANSWER  A                    

5. char name[5] then memory allocated for name is
A 5
B 1
C 50
D none
 ANSWER  A                    

6. int a[]={1,2,3,4} then what is size of Array a
A 4
B 5
C 3
D 2
 ANSWER  A    
              

7. int a[4]={1,2,3,4} then what is size of Array a
A 4
B 5
C 6
D 3
 ANSWER  A                    

8. int a[]; is valid or not
A valid
B not valid
C both a and b
D none
 ANSWER  A                   

9. int a[3]={10,20,30}; then a[1]value is
A 10
B 20
C 30
D none
 ANSWER  B                    

10. int a[3]={10,20,30}; then a[0]value is
A 10
B 20
C 30
D none
 ANSWER  A                    

11. int a[3]={10,20,30}; then a[2]value is
A 10
B 20
C 30
D none
 ANSWER  C                    

12. What is output of the following? IMAGE
A 1 2 3 4 5
B 5 4 3 2 1
C both a b
D none
 ANSWER  A                    

13. What is output of the following? IMAGE
A 5 4 3 2 1
B 1 2 3 4 5
C both a b
D none
 ANSWER  A                    

14. What is output of the following? IMAGE
A sum is 15
B sum is 10
C no output
D none
 ANSWER  A                    

15. In Array elements are stored ________
A randomly
B sequentially
C both a and b
D none
 ANSWER  B                    

No comments:

Post a Comment