Wednesday, 1 May 2019

ch-4 Array




1.5 What is right way to initialize arrays ? 
a) int num[6]={2,4,12,5,45,5};
 b) int n[]={2,4,12,5,45,5};
 c) int n[6]={2,4,12}; 
d) int n[6]={2,4,12,5,45,5};

ans  b) int n[]={2,4,12,5,45,5};

 1.6 What will be the output of the following program? In C, if you pass an array as an argument to a function, what actually gets passed ?
 a) Value of elements in array 
b) First element of array 
e) Base address of array
 f) Address of the last element of array

ans e) Base address of array

.9 What is the maximum number of dimensions an array in C may have ? 
a) 2 
b) 8 
c) 20 
d) Theoretically no limits. the only practical limits are memory and compilers 

ans d) Theoretically no limits. the only practical limits are memory and compilers 

In C, if you pass an array as an argument to a function, what actually gets passed? 
a) Value of elements in array
b) First element of the array
c) Base address of the array
d) Address of the last element of array

c) Base address of the array

The expressions arr and &arr same for an array of 10 integers FALSE

5 Two dimensional array is stored in memory physically as one-dimensional array. 

An array elements are always stored in ___sequential____________ order.


An array that used more than two subscript is referred to as___(K) Multi-dimensional___ array.

When an array is declared, array name is defined as ________ to first element. 

Write a C program tio find largest element of any Array? 

What are the advantages and disadvantages of an Array ?

What are Merits and Demerits of Array in C

Write a program to reverse an array of numbers

Write a program to delete an element from a given location of an array of integers 

Write a C program to find sum of lower triangular elements on matrix

Write a program that accept an array of 10 integers and a number to be deleted from the array if found. Represent deleted element with -1 and display final array. If not found print appropriate message.  

Write a program to find greatest number in an array? 



No comments:

Post a Comment

Index

ch-1 Introduction