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 / vignesh1988i

first ordinary logic.
LOGIC 1
#include<stdio.h>
#include<conio.h>
void main()
{
int a[50][50],k,row,column;
printf("enter the number of rows and columns of 2D array :");
scanf("%d%d",&row,&column);
for(int i=0;i<row;i++)
{
for(int q=0;q<column;q++)
{
scanf("%d",&a[i][q]);
}
}
for(i=0;i<row;i++)
{
k=0;
for(q=0;q<column;q++)
{
k=k+a[i][q];
}
printf("%d\n",k);
}
getch();
}

Is This Answer Correct ?    20 Yes 32 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine a file’s attributes?

1011


What are extern variables in c?

943


Explain that why C is procedural?

1080


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1162


is it possible to create your own header files?

1035


What is a null string in c?

985


Once I have used freopen, how can I get the original stdout (or stdin) back?

1027


How can I delete a file?

1012


What is the advantage of a random access file?

1124


Explain the use of function toupper() with and example code?

1075


What is preprocessor with example?

996


Differentiate between a for loop and a while loop? What are it uses?

1128


What is structure padding in c?

1050


how we can make 3d venturing graphics on outer interface

4726


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2866