APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2017

Term : DECEMBER

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:25





PDF Text (Beta):

//
//
matrix
for(j=
for (k=

//
printf
for (i=
for(j=

Multiplying matrices a and b and
storing result in result
for(i=0; 1:21 ++i)
O; J0; k{
result [1] [j]+=a[i] [k]*b[k] 7

Displaying the result
("\nOutput Matrix:\n");
0; i0; j{
10177 ("£ ", 2൭5൧1 [1] [])?

if(j == ೦2-31) printf ("\n\n");

return

Output

Enter
2
Enter
2
Error!

Enter
3
Enter
2

Enter
Enter
Enter
Enter
Enter
Enter
Enter

Enter
Enter
Enter
Enter
Enter
Enter
Enter

Output

24 29
6

25

4

}
0; }

rows and column for first matrix: 3
rows and column for second matrix: 3

column of first matrix not equal to row of second.

rows and column for first matrix: 2

rows and column for second matrix: 3

elements of matrix 1:
elements all: 3
elements 312: -2
elements ௧13: 5
elements a21: 3
elements a22: 0
elements a23: 4

elements of matrix 2:
elements 11: 2

elements b12: 3

elements b21:
elements b22:
elements b31:
elements b32:

‎١‏ © © كل

‎Matrix:

‎PART ‏تا‎

‎a) Explain the concept of Pointer in C with the help of example (5)

‎Pointers are variables that hold address of another variable of same data type.

‎Pointers are one of the most distinct and exciting features of C language. It provides power and
flexibility to the language. Although pointer may appear little confusing and complicated in the
beginning, but trust me its a powerful tool and handy to use once its mastered.

‎n

Similar Question Papers