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

Why static variable is used in c?

1085


Add Two Numbers Without Using the Addition Operator

882


write a program in c language to print your bio-data on the screen by using functions.

6840


What are the types of pointers in c?

1080


What is array of pointers to string?

1158


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

2120


How many main () function we can have in a project?

1157


Why can arithmetic operations not be performed on void pointers?

1097


What is volatile variable in c with example?

1089


What is function prototype in c with example?

1163


Why main is used in c?

1128


Explain that why C is procedural?

1193


What is meant by int main ()?

1255


Is int a keyword in c?

1037


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

1342