SlideShare une entreprise Scribd logo
1  sur  14
Gagan Deep
Founder & Director
Rozy Computech Services
Kurukshetra-136119, M- 9416011599
Email – rozygag@yahoo.com
Visit us at : www.rozyph.com
Arrays
 Array is a linear list of homogenous elements, stored at
successive memory locations in consecutive order.
 In C, array always starts from 0 and end with size-1 and be
written as
rollnumb[0], rollnumb[1]……….rollnumb[49]
 and be declared as
int rollnumb[50];
 means declaration syntax is
datatype arrayname [size];
 Types of array
One-Dimensional
Multi-Dimensional
One Dimensional Arrays
 Array having only one subscript variable is called one-
dimensional array and also called as single dimensional
array or linear array.
 Example of one dimensional array definition
int marks[5] = {50, 85, 60, 55, 90};
 And represented as
marks[0] =50
marks[1] = 85
marks[2] = 60
marks[3] = 55
marks[4] = 90
 A specific element in an array is accessed by an index.
Accessing One Dimensional Arrays
Program 1 : Input and output of an
Array
#include <stdio.h>
void main()
{ int marks[5],i;
printf(“Input of Array marks”);
for (i=0; i<5; i++)
scanf(“%d”, &marks[i]);
printf(“Output of Array marks”);
for (i=0; i<5; i++)
printf(“marks[%d] = %d ”, i,
marks[i]);
}
Input of Array marks
(if you entered )
50
85
60
55
90
(you will get)
Output of Array marks
marks[0] =50
marks[1] = 85
marks[2] = 60
marks[3] = 55
marks[4] = 90
Program 2 : Find the largest in an array.
#include<stdio.h>
void main() { int a[20], i, n, largest;
printf("nEnter no of elements :");
scanf("%d", &n);
for (i = 0; i < n; i++) // Input Array
scanf("%d", &a[i]);
largest = a[0]; //Consider first element as largest
for (i = 0; i < n; i++) //Process
if (a[i] > largest)
largest = a[i];
printf("nLargest Element : %d", largest); }//output largest
Program 3 : Linear Search
#include<stdio.h>
void main() { int a[20], i, n, item, loc=-1;
printf("nEnter no of elements :"); scanf("%d", &n);
for (i = 0; i < n; i++) // Input Array
scanf("%d", &a[i]);
printf("nEnter the item to be search:"); scanf("%d", &item);
for (i = 0; i < n; i++) //Process
if (a[i] == item)
{ loc= i; break; }
if (loc>=0) //output largest
printf("nItem Found: %d", loc+1);
else printf("nItem Not Found: %d" }
Program 4 : Insertion of Item in an Array
#include<stdio.h>
void main() { int a[20], i, n, j, k, item, loc;
printf("Enter the size of an array: "); scanf("%d",&n);
for(i=0;i<n;i++) scanf("%d",&a[i]); //Input Array
printf("Enter the item to be insert: "); scanf("%d",&item);
printf(“At what location: "); scanf("%d",&loc);
j=n-1; k=loc-1;
while(j>=k){ //process
a[j+1]=a[j] ;
j=j-1; }
a[k]=item; n=n+1;
for(i=0;i<n;i++)
printf("%d",a[i]); //Output Array
Program 5 : Bubble Sort
#include<stdio.h>
void main() { int a[20], i, n, p,c;
printf("Enter the size of an array: "); scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]); //Input Array
for (p=0; p<n-1;p++) //Bubble Sort Process - Ascending
for(c=0; c< n-1-p; c++)
if a[c] > a[c+1]
{t=a[c]; a[c]=a[c+1]; a[c+1]=t;} //swapping
for(i=0;i<n;i++)
printf("%d",a[i]); //Output Array
Do Yourself
Understand Algorithms and do the programming of Following
1. Deletion from an Array
2. Merging
3. Insertion Sort
4. Selection Sort
5. Merge Sort
6. Radix Sort
7. Second Largest Element in the List
8. Delete the item from the list
9. Prime Numbers using Sieve’s Algorithm
MultiDimensional Array
 Multidimensional arrays are defined in much the same
manner as one dimensional arrays, except that a
separate square brackets required in each subscript.
 Thus, a two dimensional array will require two pairs
of square bracket,
aij -> a[i][j] -> a[rows][coulmn]
 a three dimensional array will require three pairs of
square brackets, and so on
aijk -> a[i][j][k] -> a[page][rows][coulmn]
MultiDimensional Array
 In general terms, a multidimensional array definition
can be written as
Storage –class data-type array[exp 1][exp 2]………[exp n]
 Where storage-class refers to the storage class of the
array,
 Where data-type is the data type
 array is the array name
 exp 1, exp 2 and exp n are positive valued integer
expression that indicate the number of array
elements associated with each subscripts.
2 Dimensional Array
 2 dimensional array can be expressed as
col1 col2 col3 coln
Row 1
Row 2
Row 3
Row n
X[0][0] X[0][1] X[0][n-1]
X[1][0] X[1][1] X[1][n-1]
X[n-1][0] X[n-1][1] X[n-1][n-1]
Addition of two matrices Programs 6
#include <stdio.h>
void main()
{ float a[3][3], b[3][3], c[3][3];
int i,j;
printf("Enter the elements of
1st matrixn");
for(i=0;i<3;++i)
for(j=0;j<3;++j)
scanf("%f",&a[i][j]);
printf("Enter the elements of
2nd matrixn");
for(i=0;i<3;++i)
for(j=0;j<3;++j)
scanf("%f",&b[i][j]);
for(i=0;i<3;++i)
for(j=0;j<3;++j)
c[i][j]=a[i][j]+b[i][j];
printf("nSum Of Matrix:");
for(i=0;i<3;++i)
{
for(j=0;j<3;++j)
printf("%.1ft",c[i][j]);
printf("n"); }
}
If you have any queries you can
contact me at :
rozygag@yahoo.com
Visit us at : www.rozyph.com

Contenu connexe

Tendances

Tendances (20)

Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programming
 
Character Array and String
Character Array and StringCharacter Array and String
Character Array and String
 
C++ programming (Array)
C++ programming (Array)C++ programming (Array)
C++ programming (Array)
 
Strings in c++
Strings in c++Strings in c++
Strings in c++
 
Array in C
Array in CArray in C
Array in C
 
Array in c++
Array in c++Array in c++
Array in c++
 
Unit 3. Input and Output
Unit 3. Input and OutputUnit 3. Input and Output
Unit 3. Input and Output
 
C++ Arrays
C++ ArraysC++ Arrays
C++ Arrays
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
 
Python list
Python listPython list
Python list
 
Arrays In C Language
Arrays In C LanguageArrays In C Language
Arrays In C Language
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Scope rules : local and global variables
Scope rules : local and global variablesScope rules : local and global variables
Scope rules : local and global variables
 
Arrays 1D and 2D , and multi dimensional
Arrays 1D and 2D , and multi dimensional Arrays 1D and 2D , and multi dimensional
Arrays 1D and 2D , and multi dimensional
 
Arrays in java
Arrays in javaArrays in java
Arrays in java
 
String Manipulation in Python
String Manipulation in PythonString Manipulation in Python
String Manipulation in Python
 
Handling of character strings C programming
Handling of character strings C programmingHandling of character strings C programming
Handling of character strings C programming
 
One Dimensional Array
One Dimensional Array One Dimensional Array
One Dimensional Array
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
 
Features of c language 1
Features of c language 1Features of c language 1
Features of c language 1
 

En vedette (7)

Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)
 
Dbs3024 biz trx week 2 double entry system
Dbs3024 biz trx week 2 double entry systemDbs3024 biz trx week 2 double entry system
Dbs3024 biz trx week 2 double entry system
 
Double entry system
Double entry systemDouble entry system
Double entry system
 
Double entry systme
Double entry systmeDouble entry systme
Double entry systme
 
Double Entry
Double EntryDouble Entry
Double Entry
 
Array in c language
Array in c languageArray in c language
Array in c language
 
Arrays
ArraysArrays
Arrays
 

Similaire à C Programming : Arrays

presentation_arrays_1443553113_140676.ppt
presentation_arrays_1443553113_140676.pptpresentation_arrays_1443553113_140676.ppt
presentation_arrays_1443553113_140676.ppt
NamakkalPasanga
 

Similaire à C Programming : Arrays (20)

02 arrays
02 arrays02 arrays
02 arrays
 
CP Handout#7
CP Handout#7CP Handout#7
CP Handout#7
 
presentation_arrays_1443553113_140676.ppt
presentation_arrays_1443553113_140676.pptpresentation_arrays_1443553113_140676.ppt
presentation_arrays_1443553113_140676.ppt
 
Arrays-Computer programming
Arrays-Computer programmingArrays-Computer programming
Arrays-Computer programming
 
SlideSet_4_Arraysnew.pdf
SlideSet_4_Arraysnew.pdfSlideSet_4_Arraysnew.pdf
SlideSet_4_Arraysnew.pdf
 
Arrays
ArraysArrays
Arrays
 
Unit 6. Arrays
Unit 6. ArraysUnit 6. Arrays
Unit 6. Arrays
 
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
 
Arrays
ArraysArrays
Arrays
 
SPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in CSPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in C
 
Arrays
ArraysArrays
Arrays
 
Array and its types and it's implemented programming Final.pdf
Array and its types and it's implemented programming Final.pdfArray and its types and it's implemented programming Final.pdf
Array and its types and it's implemented programming Final.pdf
 
Unit 2 dsa LINEAR DATA STRUCTURE
Unit 2 dsa LINEAR DATA STRUCTUREUnit 2 dsa LINEAR DATA STRUCTURE
Unit 2 dsa LINEAR DATA STRUCTURE
 
Array
ArrayArray
Array
 
1D Array
1D Array1D Array
1D Array
 
Arrays In C
Arrays In CArrays In C
Arrays In C
 
Array
ArrayArray
Array
 
Introduction to Arrays in C
Introduction to Arrays in CIntroduction to Arrays in C
Introduction to Arrays in C
 
Array assignment
Array assignmentArray assignment
Array assignment
 
[ITP - Lecture 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types[ITP - Lecture 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types
 

Plus de Gagan Deep

Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
Gagan Deep
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i i
Gagan Deep
 

Plus de Gagan Deep (20)

Number system
Number systemNumber system
Number system
 
Fundamentals of Neural Networks
Fundamentals of Neural NetworksFundamentals of Neural Networks
Fundamentals of Neural Networks
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Software Project Planning V
Software Project Planning VSoftware Project Planning V
Software Project Planning V
 
Software Project Planning IV
Software Project Planning IVSoftware Project Planning IV
Software Project Planning IV
 
Software Project Planning III
Software Project Planning IIISoftware Project Planning III
Software Project Planning III
 
Software Project Planning II
Software Project Planning IISoftware Project Planning II
Software Project Planning II
 
Software Project Planning 1
Software Project Planning 1Software Project Planning 1
Software Project Planning 1
 
Software Engineering
Software Engineering Software Engineering
Software Engineering
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
C lecture 3 control statements slideshare
C lecture 3 control statements slideshareC lecture 3 control statements slideshare
C lecture 3 control statements slideshare
 
C – A Programming Language- I
C – A Programming Language- IC – A Programming Language- I
C – A Programming Language- I
 
System Analysis & Design - 2
System Analysis & Design - 2System Analysis & Design - 2
System Analysis & Design - 2
 
System Analysis & Design - I
System Analysis & Design - ISystem Analysis & Design - I
System Analysis & Design - I
 
Information System and MIS
Information System and MISInformation System and MIS
Information System and MIS
 
SQL – A Tutorial I
SQL – A Tutorial  ISQL – A Tutorial  I
SQL – A Tutorial I
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
Normalization 1
Normalization 1Normalization 1
Normalization 1
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i i
 
Plsql overview
Plsql overviewPlsql overview
Plsql overview
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Dernier (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

C Programming : Arrays

  • 1. Gagan Deep Founder & Director Rozy Computech Services Kurukshetra-136119, M- 9416011599 Email – rozygag@yahoo.com Visit us at : www.rozyph.com
  • 2. Arrays  Array is a linear list of homogenous elements, stored at successive memory locations in consecutive order.  In C, array always starts from 0 and end with size-1 and be written as rollnumb[0], rollnumb[1]……….rollnumb[49]  and be declared as int rollnumb[50];  means declaration syntax is datatype arrayname [size];  Types of array One-Dimensional Multi-Dimensional
  • 3. One Dimensional Arrays  Array having only one subscript variable is called one- dimensional array and also called as single dimensional array or linear array.  Example of one dimensional array definition int marks[5] = {50, 85, 60, 55, 90};  And represented as marks[0] =50 marks[1] = 85 marks[2] = 60 marks[3] = 55 marks[4] = 90  A specific element in an array is accessed by an index.
  • 4. Accessing One Dimensional Arrays Program 1 : Input and output of an Array #include <stdio.h> void main() { int marks[5],i; printf(“Input of Array marks”); for (i=0; i<5; i++) scanf(“%d”, &marks[i]); printf(“Output of Array marks”); for (i=0; i<5; i++) printf(“marks[%d] = %d ”, i, marks[i]); } Input of Array marks (if you entered ) 50 85 60 55 90 (you will get) Output of Array marks marks[0] =50 marks[1] = 85 marks[2] = 60 marks[3] = 55 marks[4] = 90
  • 5. Program 2 : Find the largest in an array. #include<stdio.h> void main() { int a[20], i, n, largest; printf("nEnter no of elements :"); scanf("%d", &n); for (i = 0; i < n; i++) // Input Array scanf("%d", &a[i]); largest = a[0]; //Consider first element as largest for (i = 0; i < n; i++) //Process if (a[i] > largest) largest = a[i]; printf("nLargest Element : %d", largest); }//output largest
  • 6. Program 3 : Linear Search #include<stdio.h> void main() { int a[20], i, n, item, loc=-1; printf("nEnter no of elements :"); scanf("%d", &n); for (i = 0; i < n; i++) // Input Array scanf("%d", &a[i]); printf("nEnter the item to be search:"); scanf("%d", &item); for (i = 0; i < n; i++) //Process if (a[i] == item) { loc= i; break; } if (loc>=0) //output largest printf("nItem Found: %d", loc+1); else printf("nItem Not Found: %d" }
  • 7. Program 4 : Insertion of Item in an Array #include<stdio.h> void main() { int a[20], i, n, j, k, item, loc; printf("Enter the size of an array: "); scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); //Input Array printf("Enter the item to be insert: "); scanf("%d",&item); printf(“At what location: "); scanf("%d",&loc); j=n-1; k=loc-1; while(j>=k){ //process a[j+1]=a[j] ; j=j-1; } a[k]=item; n=n+1; for(i=0;i<n;i++) printf("%d",a[i]); //Output Array
  • 8. Program 5 : Bubble Sort #include<stdio.h> void main() { int a[20], i, n, p,c; printf("Enter the size of an array: "); scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); //Input Array for (p=0; p<n-1;p++) //Bubble Sort Process - Ascending for(c=0; c< n-1-p; c++) if a[c] > a[c+1] {t=a[c]; a[c]=a[c+1]; a[c+1]=t;} //swapping for(i=0;i<n;i++) printf("%d",a[i]); //Output Array
  • 9. Do Yourself Understand Algorithms and do the programming of Following 1. Deletion from an Array 2. Merging 3. Insertion Sort 4. Selection Sort 5. Merge Sort 6. Radix Sort 7. Second Largest Element in the List 8. Delete the item from the list 9. Prime Numbers using Sieve’s Algorithm
  • 10. MultiDimensional Array  Multidimensional arrays are defined in much the same manner as one dimensional arrays, except that a separate square brackets required in each subscript.  Thus, a two dimensional array will require two pairs of square bracket, aij -> a[i][j] -> a[rows][coulmn]  a three dimensional array will require three pairs of square brackets, and so on aijk -> a[i][j][k] -> a[page][rows][coulmn]
  • 11. MultiDimensional Array  In general terms, a multidimensional array definition can be written as Storage –class data-type array[exp 1][exp 2]………[exp n]  Where storage-class refers to the storage class of the array,  Where data-type is the data type  array is the array name  exp 1, exp 2 and exp n are positive valued integer expression that indicate the number of array elements associated with each subscripts.
  • 12. 2 Dimensional Array  2 dimensional array can be expressed as col1 col2 col3 coln Row 1 Row 2 Row 3 Row n X[0][0] X[0][1] X[0][n-1] X[1][0] X[1][1] X[1][n-1] X[n-1][0] X[n-1][1] X[n-1][n-1]
  • 13. Addition of two matrices Programs 6 #include <stdio.h> void main() { float a[3][3], b[3][3], c[3][3]; int i,j; printf("Enter the elements of 1st matrixn"); for(i=0;i<3;++i) for(j=0;j<3;++j) scanf("%f",&a[i][j]); printf("Enter the elements of 2nd matrixn"); for(i=0;i<3;++i) for(j=0;j<3;++j) scanf("%f",&b[i][j]); for(i=0;i<3;++i) for(j=0;j<3;++j) c[i][j]=a[i][j]+b[i][j]; printf("nSum Of Matrix:"); for(i=0;i<3;++i) { for(j=0;j<3;++j) printf("%.1ft",c[i][j]); printf("n"); } }
  • 14. If you have any queries you can contact me at : rozygag@yahoo.com Visit us at : www.rozyph.com