SlideShare a Scribd company logo
Array Matrix Multiplication
Program - C Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int a[3][3],b[3][3],c[3][3],i,j;
printf("Enter the first matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf("%d",&a[i][j]);
}
}
printf("Enter the second matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf("%d",&b[i][j]);
}
}
printf("The product of the matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
c[i][j]=a[i][j]*b[i][j];
printf("%dt",c[i][j]);
}
printf("n");
}
return 0;
}
Array Matrix Program - C
Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int i,j;
int array[3][3];
printf("Enter the valuen");
for(i=0;i<3;i=i+1){
for(j=0;j<3;j=j+1){
scanf("%d",&array[i][j]);
}
}
• printf("The matrix is %dn");
for(i=0;i<3;i=i+1){
for(j=0;j<3;j=j+1){
printf("%dt",array[i][j]);
}
printf("n");
}
return 0;
}
Array Matrix Sum Program -
C Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int a[3][3],b[3][3],c[3][3],i,j;
printf("Enter the first matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf("%d",&a[i][j]);
}
}
printf("Enter the second matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf("%d",&b[i][j]);
}
}
printf("The sum of the matrix.n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
c[i][j]=a[i][j]+b[i][j];
printf("%dt",c[i][j]);
}
printf("n");
}
return 0;
}
Array Program To Calculate
Sum & Average - C Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int i;
int sum=0;
int avg;
int a[5];
printf("Enter the marksn");
for(i=0;i<5;i=i+1){
scanf("%d",&a[5]);
sum=sum+a[5];
}
printf("The sum is %dn",sum);
avg=sum/5;
printf("The average is %dn",avg);
return 0;
}
Array Program To Display
Value On Index - C Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int i,j;
int array[5];
printf("Enter the marks =n");
for(i=0;i<5;i=i+1){
scanf("%d",&array[i]);
• }
printf("%d",array[2]);
• return 0;
}
Array Program To Enter &
Display Marks - C Language
Visit our website for more https://www.swebllc.com
• #include <stdio.h>
#include <stdlib.h>
• int main()
{
int i,j;
int array[5];
printf("Enter the marks =n");
for(i=0;i<5;i=i+1){
scanf("%d",&array[i]);
• }
for(j=0;j<5;j++)
{
printf("%d",array[j]);
}
• return 0;
}

More Related Content

What's hot (20)

PPTX
Dbscan algorithom
Mahbubur Rahman Shimul
 
PPT
Algorithm analysis
sumitbardhan
 
PDF
PPS Notes Unit 5.pdf
Sreedhar Chowdam
 
PDF
List , tuples, dictionaries and regular expressions in python
channa basava
 
PPT
Lecture 8 dynamic programming
Oye Tu
 
PPTX
Knowledge representation and Predicate logic
Amey Kerkar
 
PPTX
Stressen's matrix multiplication
Kumar
 
PPTX
Python Seaborn Data Visualization
Sourabh Sahu
 
PPTX
K means clustering
keshav goyal
 
PDF
UNIT I LINEAR DATA STRUCTURES – LIST
Kathirvel Ayyaswamy
 
PPTX
String Matching (Naive,Rabin-Karp,KMP)
Aditya pratap Singh
 
PPTX
Quick sort-Data Structure
Jeanie Arnoco
 
PDF
Advanced data structures vol. 1
Christalin Nelson
 
PPTX
Introduction to Linear Discriminant Analysis
Jaclyn Kokx
 
PPTX
Bruteforce algorithm
Rezwan Siam
 
PPTX
LR(1) and SLR(1) parsing
R Islam
 
PPTX
Input-Buffering
Dattatray Gandhmal
 
PPTX
Unit I - Evaluation of expression
DrkhanchanaR
 
PDF
Algorithms Lecture 7: Graph Algorithms
Mohamed Loey
 
PPT
3.1 clustering
Krish_ver2
 
Dbscan algorithom
Mahbubur Rahman Shimul
 
Algorithm analysis
sumitbardhan
 
PPS Notes Unit 5.pdf
Sreedhar Chowdam
 
List , tuples, dictionaries and regular expressions in python
channa basava
 
Lecture 8 dynamic programming
Oye Tu
 
Knowledge representation and Predicate logic
Amey Kerkar
 
Stressen's matrix multiplication
Kumar
 
Python Seaborn Data Visualization
Sourabh Sahu
 
K means clustering
keshav goyal
 
UNIT I LINEAR DATA STRUCTURES – LIST
Kathirvel Ayyaswamy
 
String Matching (Naive,Rabin-Karp,KMP)
Aditya pratap Singh
 
Quick sort-Data Structure
Jeanie Arnoco
 
Advanced data structures vol. 1
Christalin Nelson
 
Introduction to Linear Discriminant Analysis
Jaclyn Kokx
 
Bruteforce algorithm
Rezwan Siam
 
LR(1) and SLR(1) parsing
R Islam
 
Input-Buffering
Dattatray Gandhmal
 
Unit I - Evaluation of expression
DrkhanchanaR
 
Algorithms Lecture 7: Graph Algorithms
Mohamed Loey
 
3.1 clustering
Krish_ver2
 

Similar to Array matrix example programs - C language (20)

DOCX
ADA FILE
Gaurav Singh
 
PDF
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
PDF
Cpd lecture im 207
Syed Tanveer
 
DOCX
Data structure new lab manual
SANTOSH RATH
 
PDF
Pattern printing-in-c(Jaydip Kikani)
Jaydip JK
 
DOCX
Chapter 8 c solution
Azhar Javed
 
PPTX
C Programming Language Part 8
Rumman Ansari
 
PDF
Data struture lab
krishnamurthy Murthy.Tt
 
PDF
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Salar Delavar Qashqai
 
PDF
DSC program.pdf
Prof. Dr. K. Adisesha
 
PDF
Zoro123456789123456789123456789123456789
Ghh
 
PDF
labb123456789123456789123456789123456789
Ghh
 
PDF
C programs
Koshy Geoji
 
PDF
2Darrays.pdf. data structure using c programming
maha280307
 
DOCX
SaraPIC
Sara Sahu
 
PDF
C Programming Example
PRATHAMESH DESHPANDE
 
PDF
C Prog - Pointers
vinay arora
 
PDF
Geometric nonlinearity analysis of springs with rigid element displacement co...
Salar Delavar Qashqai
 
ADA FILE
Gaurav Singh
 
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
Cpd lecture im 207
Syed Tanveer
 
Data structure new lab manual
SANTOSH RATH
 
Pattern printing-in-c(Jaydip Kikani)
Jaydip JK
 
Chapter 8 c solution
Azhar Javed
 
C Programming Language Part 8
Rumman Ansari
 
Data struture lab
krishnamurthy Murthy.Tt
 
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Salar Delavar Qashqai
 
DSC program.pdf
Prof. Dr. K. Adisesha
 
Zoro123456789123456789123456789123456789
Ghh
 
labb123456789123456789123456789123456789
Ghh
 
C programs
Koshy Geoji
 
2Darrays.pdf. data structure using c programming
maha280307
 
SaraPIC
Sara Sahu
 
C Programming Example
PRATHAMESH DESHPANDE
 
C Prog - Pointers
vinay arora
 
Geometric nonlinearity analysis of springs with rigid element displacement co...
Salar Delavar Qashqai
 
Ad

More from Sk_Group (7)

PDF
Electronics 1 : Chapter # 08 : Field effect transistor
Sk_Group
 
PDF
Electronics 1 : Chapter # 07 : AC Analysis BJT
Sk_Group
 
PDF
Electronics 1 : Chapter # 06 : Bipolar Junction Transistor
Sk_Group
 
PDF
Electronics 1 : Chapter # 05 : DC Biasing BJT
Sk_Group
 
PDF
Electronics 1 : Chapter # 04 : Diode Applications and Types
Sk_Group
 
PDF
Electronics 1 : Chapter # 03 : Moving charge carriers
Sk_Group
 
PDF
Electronics 1: Chapter # 01 : Electric Circuit analysis Review
Sk_Group
 
Electronics 1 : Chapter # 08 : Field effect transistor
Sk_Group
 
Electronics 1 : Chapter # 07 : AC Analysis BJT
Sk_Group
 
Electronics 1 : Chapter # 06 : Bipolar Junction Transistor
Sk_Group
 
Electronics 1 : Chapter # 05 : DC Biasing BJT
Sk_Group
 
Electronics 1 : Chapter # 04 : Diode Applications and Types
Sk_Group
 
Electronics 1 : Chapter # 03 : Moving charge carriers
Sk_Group
 
Electronics 1: Chapter # 01 : Electric Circuit analysis Review
Sk_Group
 
Ad

Recently uploaded (20)

PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 

Array matrix example programs - C language

  • 1. Array Matrix Multiplication Program - C Language Visit our website for more https://www.swebllc.com
  • 2. • #include <stdio.h> #include <stdlib.h> • int main() { int a[3][3],b[3][3],c[3][3],i,j; printf("Enter the first matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&a[i][j]); } } printf("Enter the second matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&b[i][j]); } } printf("The product of the matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ c[i][j]=a[i][j]*b[i][j]; printf("%dt",c[i][j]); } printf("n"); } return 0; }
  • 3. Array Matrix Program - C Language Visit our website for more https://www.swebllc.com
  • 4. • #include <stdio.h> #include <stdlib.h> • int main() { int i,j; int array[3][3]; printf("Enter the valuen"); for(i=0;i<3;i=i+1){ for(j=0;j<3;j=j+1){ scanf("%d",&array[i][j]); } } • printf("The matrix is %dn"); for(i=0;i<3;i=i+1){ for(j=0;j<3;j=j+1){ printf("%dt",array[i][j]); } printf("n"); } return 0; }
  • 5. Array Matrix Sum Program - C Language Visit our website for more https://www.swebllc.com
  • 6. • #include <stdio.h> #include <stdlib.h> • int main() { int a[3][3],b[3][3],c[3][3],i,j; printf("Enter the first matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&a[i][j]); } } printf("Enter the second matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&b[i][j]); } } printf("The sum of the matrix.n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ c[i][j]=a[i][j]+b[i][j]; printf("%dt",c[i][j]); } printf("n"); } return 0; }
  • 7. Array Program To Calculate Sum & Average - C Language Visit our website for more https://www.swebllc.com
  • 8. • #include <stdio.h> #include <stdlib.h> • int main() { int i; int sum=0; int avg; int a[5]; printf("Enter the marksn"); for(i=0;i<5;i=i+1){ scanf("%d",&a[5]); sum=sum+a[5]; } printf("The sum is %dn",sum); avg=sum/5; printf("The average is %dn",avg); return 0; }
  • 9. Array Program To Display Value On Index - C Language Visit our website for more https://www.swebllc.com
  • 10. • #include <stdio.h> #include <stdlib.h> • int main() { int i,j; int array[5]; printf("Enter the marks =n"); for(i=0;i<5;i=i+1){ scanf("%d",&array[i]); • } printf("%d",array[2]); • return 0; }
  • 11. Array Program To Enter & Display Marks - C Language Visit our website for more https://www.swebllc.com
  • 12. • #include <stdio.h> #include <stdlib.h> • int main() { int i,j; int array[5]; printf("Enter the marks =n"); for(i=0;i<5;i=i+1){ scanf("%d",&array[i]); • } for(j=0;j<5;j++) { printf("%d",array[j]); } • return 0; }