how can i get the output
54321
4321
321
21
1

in c programming........???? pls help......

Answer Posted / rishabh upadhyay

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

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is C language being considered a middle level language?

660


What is memory leak in c?

639


what are bit fields? What is the use of bit fields in a structure declaration?

1506


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2233


How does sizeof know array size?

636






List a few unconditional control statement in c.

564


write a program to rearrange the array such way that all even elements should come first and next come odd

1766


Explain the process of converting a Tree into a Binary Tree.

2113


what are the advantages of a macro over a function?

652


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

604


What is the best style for code layout in c?

636


What is the function of volatile in c language?

670


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2415


what is different between auto and local static? why should we use local static?

648


in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

684