code snippet for creating a pyramids triangle
ex

1
2 2
3 3 3

Answer Posted / manvi

main()
{
int i,j,n;
printf("enter the limit");
scanf("%d",&n);
for(i=1;i<=n;i++)
{

for(j=0;j<i;j++)
{
printf("%d",i);
}
printf("\n");
}

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue?

627


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

641


Who is the founder of c language?

671


What are the uses of a pointer?

669


What is a null string in c?

575






What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

718


What should malloc() do?

631


What is ## preprocessor operator in c?

604


What is this infamous null pointer, anyway?

600


In a switch statement, what will happen if a break statement is omitted?

596


The statement, int(*x[]) () what does in indicate?

635


Explain data types & how many data types supported by c?

570


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

586


write a program to print data of 5 five students with structures?

1598


Is c easy to learn?

550