Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to print sum of each row of a 2D array.

Answer Posted / khurshid alam

#include<stdio.h>
int main()
{
int a[3][3]={{2,5},{7,8},{1,1}};
int b[3][3]={{5,6},{9,3},{1,1}},i,j,*m,*n,s=0;
n=&a[j][i];
m=&b[j][i];
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
s+=a[i][j]+b[i][j];

}

}
printf("Sum :%d",s);
return 0;

}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2024


What are 'near' and 'far' pointers?

985


Should a function contain a return statement if it does not return a value?

1024


Why c is faster than c++?

981


Where static variables are stored in memory in c?

951


Explain logical errors? Compare with syntax errors.

1014


What is the use of clrscr?

1056


What is difference between class and structure?

1066


What is structure packing in c?

1027


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5403


What is %d called in c?

1185


What are the difference between a free-standing and a hosted environment?

1226


What are the different categories of functions in c?

1085


Write a code to generate a series where the next element is the sum of last k terms.

1173


Which is an example of a structural homology?

1251