write a program to display numbers from 1 to 10 and 10 to 1?
Answers were Sorted based on User's Feedback
Answer / sai
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=10;i++)
printf(" %d",i);
printf("\n");
for(i=10;i>=1;i--)
printf(" %d",i);
getch();
}
/* output
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1 */
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / sureshmca
#include<stdio.h>
void main()
{
int num,i;
for(num=0;num<=10;num++)
{
printf("%d",num);
}
}
| Is This Answer Correct ? | 3 Yes | 9 No |
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {
What is #include conio h?
What are .h files and what should I put in them?
In C language what is a 'dangling pointer'?
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.
Explain what is the difference between functions getch() and getche()?
What is file in c language?
What is the purpose of the statement: strcat (S2, S1)?
What is sparse file?
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
differentiate between const char *a; char *const a; and char const *a;
2 Answers College School Exams Tests, HCL, TCS,