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

Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

603


Is linux written in c?

601


How do you define a string?

655


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1119


What is volatile variable in c with example?

588






Explain the use of keyword 'register' with respect to variables.

590


When is a “switch” statement preferable over an “if” statement?

650


What are the differences between Structures and Arrays?

609


Why we use int main and void main?

535


How can I get random integers in a certain range?

611


Which is better malloc or calloc?

651


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1183


Is multithreading possible in c?

566


What is use of #include in c?

598


Explain what are multibyte characters?

629