C PROGRAMMING Assignment 2022

   

Added on  2022-08-28

7 Pages922 Words16 Views
Running head: C PROGRAMMING
C PROGRAMMING
Enter the name of the Student:
Enter the name of the University:
Author note:
C PROGRAMMING Assignment 2022_1
C PROGRAMMING1
The assignment is mainly written in the C programming language. In this assignment,
the functions of the elements of the C programming are noticed. The loop such as for, while,
the if else method for selection, structures, pointers, I/O, functions and two dimensional
arrays are used to complete this assignment.
Figure 1: Coding
(Source: Created by author)
These three are the header file which are used in this assignment. The header file is
the file with the extension that consists the declarations of the C function also the macro
definition for sharing in between many source files. Some header files are in built with the
compiler such as the stdio.h.
Figure 2: Coding
(Source: Created by author)
The structure is the user defined data type and it makes a data type which can use for
combining items of the different types into a solo type. Here a structure is created to hold the
information about the matrices. The name is used to keep the single character name of this
matrix like A, B etc. and the data type of this is char. A two dimensional array is used in this
C PROGRAMMING Assignment 2022_2
C PROGRAMMING2
named mValues which is used to keep the values in this matrix up to the 10 no of rows and
10 no of columns. The data type of this is float. Then nrows of integer data type is created
that is used to keep the number of rows which is used in the mValues. And also ncols is
created of integer data type that is used to keep the column numbers that is used in the
mValues.
Figure 3: Coding
(Source: Created by author)
The main method is started. In this main method a variable is generated of the
structure. Some variables are made here for future use. Then a function named matrixInput is
created and call to create the matrix. Another function is created named matrixDisplay that is
used to display the created matrix. After that another function is created to calculate the
determinant of the matrix which is named as matrixDeterminant and the matrixDisplay is
again used to display this matrix. And last function which is created is matrixInverse that is
calculated to inverse of the determinant and the matrixDisplay is used to display the matrix
again.
C PROGRAMMING Assignment 2022_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Technical Programming Answer 2022
|8
|1011
|31

Binary Regression, Logistic Regression and Generating Data using Python Co
|15
|2140
|354

Designing and Implementing Algorithms for Media Management and Mutable String ADT
|4
|1019
|453

Sudoku is a Number Placement Game which Consists
|8
|2164
|32

Engr 103. SFSU. Fall 2016. A. Tabrizi. School of Engine
|1
|258
|937

Assignment on Data Structures and Algorithms (Doc)
|3
|1133
|304