Hi, Anybody could tell me What is the script for Reverse of
Given number. Ex:236--632. Thanks in Advance..

Answer Posted / rohit_allinterview

int reverse(int num)
{
int temp,num2=0;
printf("Original number is %d",num);
while(num!=0)
{
temp=num%10;
num=num/10;

num2=num2+temp;
num2=num2*10;
}

num=num2/10;
printf("Reversed Number is %d",num);
}

// Incase of any mistake or doubt plz drop mailto
rohit_vit2020@yahoo.co.in

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention how you can call vbscript functions?

578


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

3265


How to access array data?

537


how to write validation function for date in vb script

2140


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

599






what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?

1430


Which in-built function related to an array joins substrings into one string in the vbscript language?

512


What are subprocedures in vbscript?

655


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

483


Which constant is used for print and display functions and works as same as pressing enter key?

524


If else for do while select in vb script?

636


How will you get a string with the specified character the specified number of times in vbscript?

569


Which event is triggered when mouse focus comes out of an element in the vbscript language?

507


Explain the operator precedence in vb script?

648


how to check whether link is disabled in QTP??

5629