tag:blogger.com,1999:blog-959939550345671470.post4562856541385003126..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: Write a c program to print Pascal trianglePriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-959939550345671470.post-6334282473843773152014-01-19T16:00:49.932+05:302014-01-19T16:00:49.932+05:30yes it will surely give pascal triangle upto a cer...yes it will surely give pascal triangle upto a certain limit but this is much longer than the program for pascal triangle(mentioned above) Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-90546869054638765392013-12-12T12:44:08.003+05:302013-12-12T12:44:08.003+05:30#include
#include
#include
void main()
{
int i,j,k...#include<br />#include<br />#include<br />void main()<br />{<br />int i,j,k,n,p;<br />printf("enter no of rows:");<br />scanf("%d",&n);<br />fflush(stdin);<br />for(i=1;i<=n;i++)<br />{<br />for(j=1;j<=n-i-1;j++)<br />printf(" "); <br />for(k=1;k<=2*i-1;k++)<br />p=pow(11,i-1);<br />printf(" %d\t",p);<br />printf("\n");<br />}<br />Anonymoushttps://www.blogger.com/profile/00369843532060813094noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-67772250339355363642012-01-29T18:29:47.495+05:302012-01-29T18:29:47.495+05:30try this one
#include
#include
main()
{
int le...try this one<br /><br /><br />#include<br />#include<br />main()<br />{<br /> int length,i,j,k;<br /> //Accepting length from user<br /> printf("Enter the length of pascal's triangle : ");<br /> scanf("%d",&length);<br /><br /> //Printing the pascal's triangle<br /> for(i=1;i<=length;i++) {<br /> for(j=1;j<=length-i;j++)<br />bijay kchttps://www.blogger.com/profile/07844650752569111659noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-50830701653268947722011-12-24T17:45:40.183+05:302011-12-24T17:45:40.183+05:30great jobgreat jobsanjay samanthttps://www.blogger.com/profile/13579105573931965689noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-16987223767405106672011-01-08T19:57:53.426+05:302011-01-08T19:57:53.426+05:30thi program shud give the pascals triangle for a l...thi program shud give the pascals triangle for a limited number<br /><br /><br />#include<br /><br />int fact(int n)<br />{ int ctr,pro=1;<br /> for(ctr=n;ctr>0;ctr--)<br /> pro*=ctr;<br /> return pro;<br />}<br /><br />int combi(int n, int r)<br />{ int c;<br /> c=fact(n)/(fact(r)*fact(n-r));<br /> return c;<br />}<br /><br />main( )<br />{ int n,ctr1,ctr2,r,num,cm;<br /heeranoreply@blogger.com