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
Mention how you can call vbscript functions?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
How to access array data?
how to write validation function for date in vb script
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
Which in-built function related to an array joins substrings into one string in the vbscript language?
What are subprocedures in vbscript?
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?
Which constant is used for print and display functions and works as same as pressing enter key?
If else for do while select in vb script?
How will you get a string with the specified character the specified number of times in vbscript?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
Explain the operator precedence in vb script?
how to check whether link is disabled in QTP??