WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

Answer Posted / ajay

#include<stdio.h>
#include<conio.h>
main()
{
int a, b,c,d;
printf("Enter a value:");
scanf("%d", &a);
if (a%10==0)
{b=a/10;
printf("Reverse value is:%0d", b);}
else
{c=a%10;
d=(a/10)+(c*10);
printf("Reverse value is:%d", d);}
getch();
}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c platform dependent?

626


What are predefined functions in c?

570


Explain how do you print only part of a string?

652


How many types of operator or there in c?

607


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

646






Explain what math functions are available for integers? For floating point?

618


What is structure packing in c?

612


What are register variables? What are the advantage of using register variables?

689


Can we use any name in place of argv and argc as command line arguments?

612


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1214


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

2989


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.

722


Are there constructors in c?

600


Differentiate between functions getch() and getche().

627


Explain why c is faster than c++?

579