filmov
tv
C Program to print Sum of two 2-D Arrays - C Programming Tutorial 76
![preview_player](https://i.ytimg.com/vi/o-eNWFYAYKw/maxresdefault.jpg)
Показать описание
Notes for You:: C Program to print Sum of two 2-D Arrays - C Programming Tutorial 76
Example Code:
#include<stdio.h>
int main()
{
int a[2][2] = {{1,2},{3,4}};
int b[2][2] = {{4,3},{2,1}};
int c[2][2] = {{0,0},{0,0}};
int row=0;
int col=0;
for(row=0; row<2; row++)
{
for(col=0; col<2; col++)
{
c[row][col] = a[row][col] + b[row][col];
printf("%d ",c[row][col]);
}
printf("\n");
}
return 0;
}
Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.
Output:
5 5
5 5
=========================================
Follow the link for next video:
Follow the link for previous video:
=========================================
C Programming Tutorials Playlist:
=========================================
Watch My Other Useful Tutorials:-
Computer Programming Fundamentals Playlist:-
C Practical LAB Exercises Playlist:-
C++ Tutorials Playlist:
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #CProgramming #CProgrammingTutorial
Example Code:
#include<stdio.h>
int main()
{
int a[2][2] = {{1,2},{3,4}};
int b[2][2] = {{4,3},{2,1}};
int c[2][2] = {{0,0},{0,0}};
int row=0;
int col=0;
for(row=0; row<2; row++)
{
for(col=0; col<2; col++)
{
c[row][col] = a[row][col] + b[row][col];
printf("%d ",c[row][col]);
}
printf("\n");
}
return 0;
}
Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.
Output:
5 5
5 5
=========================================
Follow the link for next video:
Follow the link for previous video:
=========================================
C Programming Tutorials Playlist:
=========================================
Watch My Other Useful Tutorials:-
Computer Programming Fundamentals Playlist:-
C Practical LAB Exercises Playlist:-
C++ Tutorials Playlist:
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #CProgramming #CProgrammingTutorial