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 is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


how can write all 1to 100 prime numbers using for loop,if and break ?

2 Answers   TCS,


What is data types?

0 Answers  


write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language

18 Answers   IT Park, TCS,


Is c easier than java?

0 Answers  






How do I round numbers?

0 Answers  


Is c a great language, or what?

0 Answers  


Explain what is the difference between the expression '++a' and 'a++'?

0 Answers  


what is the full form of c language

9 Answers   Satyam, TCS, VNC,


please give me some tips for the placement in the TCS.

0 Answers   TCS,


What is the use of structure padding in c?

0 Answers  


How would you print out the data in a binary tree, level by level, starting at the top?

6 Answers   Amazon, Microsoft,


Categories