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...

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

Answer Posted / tknowledge05

#include<conio.h>
#include<stdio.h>
void main()
{
int a[10],b[10];
int c=1,n=4;
a[0]=0;a[1]=1;a[2]=0;
b[0]=0;
printf("Enter no. of rows to print ");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
for(int j=n-2;j<0;j++)
printf(" ");
c++;
for(int k=0;k<c;k++)
{
b[k+1]=a[k]+a[k+1];
}
b[c]=0;
for(int k=1;k<=i+1;k++)
{
printf("%d ",a[k]);
}
printf("\n");
for(int k=0;k<i+3;k++)
a[k]=b[k];
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need a structure?

1043


while initialization of array why we use a[][2] why not a[2][]...?

2365


What is an expression?

1059


What is volatile variable in c with example?

1045


Why main is used in c?

1078


Describe the difference between = and == symbols in c programming?

1379


Tell me when would you use a pointer to a function?

1066


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1079


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8052


in iso what are the common technological language?

2117


Explain low-order bytes.

1039


How can I recover the file name given an open stream?

1024


How can I sort more data than will fit in memory?

1113


Explain union.

1171


Explain what is wrong with this program statement?

1121