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

A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

0 Answers  


difference between c and c++?

2 Answers  


Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?

4 Answers   TCS,


what does " calloc" do?

7 Answers   Cadence, Logos,


Can I initialize unions?

0 Answers  






write a program to print %d ?

12 Answers  


how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0

4 Answers   Wipro,


What does %c mean in c?

0 Answers  


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


What is the general form of function in c?

0 Answers  


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

0 Answers  


the question is that what you have been doing all these periods (one year gap)

0 Answers   HCL,


Categories