Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a program to display numbers from 1 to 10 and 10 to 1?

Answers were Sorted based on User's Feedback



write a program to display numbers from 1 to 10 and 10 to 1?..

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

write a program to display numbers from 1 to 10 and 10 to 1?..

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

Post New Answer

More C Interview Questions

The differences between Windows XP and Windows Visa

8 Answers   HCL,


What is c standard library?

0 Answers  


Program to find larger of the two numbers without using if-else,while,for,switch

11 Answers   iNautix, Wipro,


hi , please send me NIC written test papers to sbabavalli@gmail.com

0 Answers   NIC,


can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?

2 Answers  


How can I read a directory in a C program?

2 Answers   Bright Outdoor, Wipro,


Can you tell me how to check whether a linked list is circular?

1 Answers  


why array index always starts from zero??

4 Answers   TCS,


what defference between c and c++ ?

6 Answers  


write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview

2 Answers   Satyam, UNIS, Wipro,


what is level of tree if leaf node is at level 4.please explain.

1 Answers   Wipro,


HOW TO HANDLE EXCEPTIONS IN C

8 Answers  


Categories