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...


program to reverse the order of digits in a given number of
any length.



program to reverse the order of digits in a given number of any length...

Answer / venugopal

main()
{
long int a;
int num[];
clrscr();
printf("enter a number");
scanf("%ld",&a);
while(a!=0)
{
d=a%10;
static int i=0;/* here we declare variable as static life
time is thru out the prgm*/
num[i]=d;/* store end of digits in array
i++;
a=a/10;
}
printf("reverse of d num is");
for(int x=0;x<i;x++)
printf("%d",num[x]);
}

Is This Answer Correct ?    10 Yes 6 No

Post New Answer

More C Sharp Code Interview Questions

Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.

1 Answers   Cognizant,


How to Link Different Data Sources Together?

0 Answers  


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


working with arrays

1 Answers  


How to pass multiple rows from one gridview to another gridview after clicking the checkbox.

1 Answers   Satyam,


. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $

3 Answers  


Code for Reading and writing from a file in c#?

1 Answers  


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

0 Answers   Eastcom Systems,


Code for IP Address Comparison and Conversion in C#?

0 Answers  


program for addition of fraction(M/N + P/Q = Y/Z)

1 Answers   Mind Tree,


"c sharp" code for factorial using static variables

9 Answers  


write a Program to copy the string using switch case.

0 Answers   Mind Tree, Wipro,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)