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 the different types of data structures in c?

0 Answers  


C program to perform stack operation using singly linked list

3 Answers  


What is pointers in c with example?

0 Answers  


Three major criteria of scheduling.

1 Answers  


Why c language is called c?

0 Answers  






get any number as input except 1 and the output will be 1.without using operators,expressions,array,structure.don't print 1 in printf statement

3 Answers  


What is the use of printf() and scanf() functions?

0 Answers  


What is queue in c?

0 Answers  


what is use of malloc and calloc?

0 Answers  


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


What is the difference between File pointer and Internal Charecter Pointer?

2 Answers   TATA,


4.weight conversion: Write a program that will read weight in pounds and convert it into grams.print both the original weight and the converted value.There are 454 grams in a pound.design and carry out a test plan for this program.

1 Answers   Wipro,


Categories