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

I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.

1800


What is the difference between for loop and while loop?

561


What are the naming conventions while declaring a variable in the vbscript language?

627


Explain the .wsf files?

533


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

1828






Explain the asc function?

512


Explain different types of segment?

581


Is vbscript language a case-sensitive language and what does it mean?

554


Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

1858


What are the advantages of vbscript?

650


Which function is used to perform string comparison?

571


after medical test,when will be the police verification

1731


Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?

3042


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

870


How will you get the smallest subscript of an array in vbscript?

823