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 main () function we can have in a project?
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.
what is output of the following statetment?Printf(“%x”, -1<<4); ?
Compare interpreters and compilers.
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Write programs for String Reversal & Palindrome check
how to write a data 10 in address location 0x2000
if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.
18 Answers Parexel, Ram Infotech, Zycus Infotech,
there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?
What is C++
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?