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 double pointer in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
Write a program to print fibonacci series without using recursion?
Is it better to use malloc() or calloc()?
Give differences between - new and malloc() , delete and free() ?
Explain can static variables be declared in a header file?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
What is the difference between the expression “++a” and “a++”?
What is a function in c?
Explain what is #line used for?
What is calloc() function?
What is the difference between malloc calloc and realloc in c?
Explain pointer. What are function pointers in C?
Explain Function Pointer?
How many types of operators are there in c?