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

Why do we use & in c?

0 Answers  


How is pointer initialized in c?

0 Answers  


Write a program to check prime number in c programming?

0 Answers  


How do you determine if a string is a palindrome?

1 Answers  


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

0 Answers  


What is the difference between null pointer and void pointer

10 Answers   CTS, Manforce, MAQ Software,


Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }

3 Answers   Qualcomm,


To find whether a number is even or odd without using any conditional operator??

12 Answers   College School Exams Tests, IBM,


What is the importance of c in your views?

0 Answers  


What is the maximum length of an identifier?

0 Answers  


What’s the special use of UNIONS?

0 Answers   ADP,


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

0 Answers   Amazon,


Categories