12345
1234
123
12
1

Answers were Sorted based on User's Feedback



12345 1234 123 12 1..

Answer / malik

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=5;i>=0;i--)
{
for(j=1;j<=i;j++)
{
printf("%d", j);
}
printf("\n");
}

getch();
}

Is This Answer Correct ?    4 Yes 0 No

12345 1234 123 12 1..

Answer / prachi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d", i);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Interview Questions

What are volatile variables?

1 Answers   Mind Tree,


Write a c program to demonstrate Type casting in c?

2 Answers  


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1 Answers   HCL,


can we write a program in c for printf and scanf without using header file stdio.h

1 Answers  


What is cohesion and coupling in c?

1 Answers  


Explain about the constants which help in debugging?

1 Answers  


What does p mean in physics?

1 Answers  


What is the use of pointers in C?

1 Answers   Impetus, Motorola, Tavant Technologies, Virtusa,


What is union and structure in c?

1 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1 Answers  


what is the value of b if a=5; b=++a + ++a

31 Answers   Infosys, TCS, Tech Mahindra,


What are c preprocessors?

1 Answers  


Categories