a simple c program using 'for' loop to display the output
5
4
3
2
1
Answers were Sorted based on User's Feedback
Answer / prayashjeet chanda
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int num,i;
printf("\nEnter a number: ");
scanf("%d",&num);
for(i=num;i>0;i--)
{
printf("\n%d",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rohit dilip kakade
#include<stdio.h>
#include<conio.h>
void main(void)
{
int i;
clrscr();
for(i=5;i>0;i--)
{
printf("
%d",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
main difference between c and c++ language
When should volatile modifier be used?
Difference between fopen() and open()?
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.
though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks
3 Answers State Bank Of India SBI,
What is the purpose of macro in C language?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Why flag is used in c?
write a c programme for add of two numbers with out use of arthematic operators
Given a number N, product(N) is the product of the digits of N. We can then form a sequence N, product(N), product(product(N))… For example, using 99, we get the sequence 99, 99 = 81, 81 = 8. Input Format: A single integer N Output Format: A single integer which is the number of steps after which a single digit number occurs in the sequence. Sample Test Cases: Input #00: 99 Output #00: 2 Explanation: Step - 1 : 9 * 9 = 81 Step - 2 : 8 * 1 = 8 There are 2 steps to get to this single digit number. Input #01: 1137638147
Explain spaghetti programming?
how can f be used for both float and double arguments in printf? Are not they different types?