write a program whose output will be-
1
12
123
1234

Answer Posted / riyadh ahmed

//Answer by Riyadh
#include<stdio.h>
int main ()
{
int i,j;
for (i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("
");
}
return 0;
}

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

677


What is the advantage of c?

611


What are the 4 types of organizational structures?

625


What is data structure in c and its types?

596


In which header file is the null macro defined?

857






If errno contains a nonzero number, is there an error?

805


What is use of pointer?

587


Find MAXIMUM of three distinct integers using a single C statement

624


What are the benefits of organizational structure?

574


What is the use of function in c?

715


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

675


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

647


What is the difference between exit() and _exit() function in c?

584


What is the symbol indicated the c-preprocessor?

696


What is pragma in c?

629