Ques 1 Array
A collection of items having same data type and store contiguous memory allocation is known as
Ques 2 Array
Which of the following is advantage of array?
Ques 3 Array
What is the output of the given code ?
#include
int main( )
{
float a=0,b=1,c=2;
float *array[]={&a,&b,&c};
b=a=c;
printf("%d",b);
return 0;
}
Ques 4 Array
consider the following program:
int f(int *p,int n)
{
if(n<=1) return 0;
else return max (f(p+1,n+1),p[0]-p[1]);
}
int main( )
{
int a[]={3,5,2,6,4};
printf("%d",f(a,5));
}
Note: max(x,y) returns the maximum of x and y.
The value printed by this program is____________
Ques 5 Array
Let A be a square matrix of size nxn .consider the following pseudocode .what is the expected output ?
C=100;
for i=1 to n do
for j = 1 to n do
{
Temp=A[i][j]+C
A[i][j]=A[j][i]
A[j][i]=Temp-C
}
for i=1 to n do
for j=1 to n do
Output(A[i][j]);