Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Basics

Home > Programs > Basics

10 / 265

Write a program to print reverse of a number?

Answer:

#include 

# include 
using namespace std;
int main()
{
    int n, reversedNumber = 0, remainder;
   cout n;
    while(n != 0)
    {
        remainder = n%10;
        reversedNumber = reversedNumber*10 + remainder;
        n /= 10;
    }
  cout 

Asked In :: Wipro Syntel Inc.

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: