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
What is pass by reference in functions?
Define Array of pointers.
What do you understand by friend-functions? How are they used?
Why do we use return in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
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.
#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); }
What the advantages of using Unions?
Why is c called c?
What is difference between static and global variable in c?
Why does everyone say not to use scanf? What should I use instead?
Explain what are multibyte characters?
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?
How can I manipulate individual bits?