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

CopyBits(x,p,n,y) copy n LSBs from y to x starting LSB at 'p'th position.

9 Answers   Adobe,


main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }

6 Answers  


if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')

23 Answers  


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

0 Answers  


whats the use of header file in c?

2 Answers  






WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1 Answers   IBM,


Is return a keyword in c?

0 Answers  


can we declare a variable in different scopes with different data types? answer in detail

3 Answers   TCS,


What are inbuilt functions in c?

0 Answers  


main() { int x=5,y=10,z=0; x=x++ + y++; y=y++ + ++x; z=x++ + ++y; printf("%d%d%d\n",x,y,z); }

1 Answers   CodeChef,


Write a program to use switch statement.

0 Answers   Agilent, Integreon, ZS Associates,


what are advantages of U D F?

1 Answers   Google,


Categories