C Program to input Values in a 2x2 square matrix and display the value In this example, we will accept values from the user in a 2x2 square and matrix and then it is displayed. To solve this problem we must know what is matrices and arrays. What are Arrays? An array is a data structure for storing more than one data member of similar data type. Array can be of following types: One-dimensional Array Two-dimensional Array Multi-dimensional Array In Array we must always initialize values. PROGRAM #include <stdio.h> #include <conio.h> int main () { int a [ 2 ][ 2 ], i , j ; printf ( "Enter the values of the matrix:" ); for ( i = 0 ; i < 2 ; i ++) { for ( j = 0 ; j < 2 ...
Comments