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

Answer Posted / aditya nath

int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    18 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is modifier & how many types of modifiers available in c?

602


In c language can we compile a program without main() function?

569


Is r written in c?

722


What is a program flowchart and explain how does it help in writing a program?

663


What is the best style for code layout in c?

628






which is an algorithm for sorting in a growing Lexicographic order

1394


What library is sizeof in c?

563


Can we change the value of constant variable in c?

566


What is the difference between if else and switchstatement

1308


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1517


What is the meaning of typedef struct in c?

584


What is a void pointer in c?

602


What is the function of multilevel pointer in c?

665


What is sorting in c plus plus?

561


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

904