Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Contact no.

9836608046
ENCODING
The quest for c, c++, c#, data structure, java, unix and many more ends here

1) void main( )
{
int i = 5; float m = 4.5 ;
printf(“ %d %d %d %d %d”, sizeof(i), sizeof( i++), size (++i), sizeof(m), sizeof(m++));
}

2) void main( )
{
Printf(“%d %d %d %d %d”, sizeof(3.5f) , sizeof(“3”) , sizeof(‘3’), sizeof(3.5),
sizeof(sizeof(3.5)));
}

3) #define p(x) x + x * x + x
#define q(x) x * x
#define r(x) q(x) * x
#define s(x) (x * x)
Void main ( )
{
int a , b , c , d , e = 5;
a = p(e) ; b = q(e) + q(e) ; c= r(e) + r(e) ; d = s(++e) ;
printf( “%d %d %d %d”,a , b , c, d);
}

4) WAP to find the sum and average of numbers in the array and the size of the array will be
mentioned at the run time.( use dynamic memory allocation ).
5) State the differences between calloc and malloc.
6) WAP to find the sum of two matrices after taking them as input.
7) WAP to find the transpose of a matrix.
8) WAP to find the sum of the diagonals of a matrix.
9) WAP to find the maximum and minimum element of an array. Take the array as input in
main( ) and pass it to the function named maximum( ) and minimum( ) to do the
respective task.
10) WAP to merge two array into a single array.
11) WAP to insert an element in the array. Take the position to be inserted as input.

You might also like