Not putting // before the start of single statement comment is a compiler error. Not putting the */ after the termination of block comment is a compiler error.

Missing the inclusion of appropriate header file in c program will generate an error. Such a program may compile but the linker will given an error message as it will not be able to find the functions used in the program.

The test expression done on exact statement. The good habit of using test expression on exact or fulfill statement. So do not use floating point numbers for checking for equality in the test expression.

Specifier is a typedef-name and a very sensitive in C programming. Using an incorrect specifier for the data type being read or written will generate a run time error.

When you are using SWITCH case, it is important to keep in mind that the inclusion of DEFAULT LABEL. This will inform you whether you are executing your program in right or wrong way. So, it is always recommended to use DEFAULT LABEL in the SWITCH st

Transpose of a matrix means, make all rows of the given matrix, make as columns of the output matrix.

// AHF C PROGRAM SOLVING //solving here 2_D ARRAY programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int i,j,arr[3][3],trs_arr[3][3]; pf("Enter the matrix: "); //taking data of a matrix for(i=0;i < 3;i++) { for(j=0;j < 3;j++) { pf("\nMATRIX[%d][%d] = ",i,j); scanf("%d",&arr[i][j]); } } pf("\nThe element of the matrix is: "); for(i=0;i < 3;i++) { pf("\n"); for(j=0;j < 3;j++) pf(" %d ",arr[i][j]); } pf("\nThe transposed matrix is: "); for(i=0;i < 3;i++) { pf("\n"); for(j=0;j < 3;j++) { trs_arr[i][j]=arr[j][i]; pf(" %d ",trs_arr[i][j]); } } return 0; }

Enter the matrix: MATRIX[0][0] = 1 MATRIX[0][1] = 2 MATRIX[0][2] = 3 MATRIX[1][0] = 4 MATRIX[1][1] = 5 MATRIX[1][2] = 6 MATRIX[2][0] = 7 MATRIX[2][1] = 8 MATRIX[2][2] = 9

The element of the matrix is: 1 2 3 4 5 6 7 8 9

The transposed matrix is: 1 4 7 2 5 8 3 6 9

- Array 2_D - in small shop - there 5 salesman where each have to sall 3 products calculate ( 1 ) the total sales by each salesman and ( 2 ) total sales of each product
- Array 2_D - calculate marks of 5 students in 3 subject and display the highest marks in each subject
- Array 2_D - read and display ( 3 * 3 ) matrix
- Array 2_D - multiplication of two ( m * n ) matrix
- Array_ find largest of N numbers
- Array_ print the position of the smallest of N numbers
- Array_ interchange large and smallest number
- Array_ insertion
- Array_ deletion
- Array_ merging
- Array_ searching

© 2018 - All rights reserved