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

simple c program for 12345 convert 54321 with out using string

Answer Posted / sreenivas

#include<stdio.h>
main()
{
long n=12345,r=0;
while(n)
{
r=r*10+n%10;
n=n/10;
}
printf("%ld",r);
}

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pass by reference in functions?

810


Define Array of pointers.

1069


What do you understand by friend-functions? How are they used?

1178


Why do we use return in c?

962


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

979


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8015


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2800


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

1259


What the advantages of using Unions?

1184


Why is c called c?

985


What is difference between static and global variable in c?

1005


Why does everyone say not to use scanf? What should I use instead?

1391


Explain what are multibyte characters?

1137


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1468


How can I manipulate individual bits?

1014