int a=4857 i need output as 7584.without using any inbuild
function?

Answers were Sorted based on User's Feedback



int a=4857 i need output as 7584.without using any inbuild function?..

Answer / r.singh

varnum=4857
vartemp=0
while(varnum/10)>0 then
vartemp=(vartemp*10)+(varnum mod 10)
varnum=varnum/10
wend
rev=vartemp
msgbox rev

Is This Answer Correct ?    9 Yes 1 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / bantanahal haribabu

s="12345"
While int(s)>0
n=s mod 10
x=x&n
s=int(s)/10
Wend
msgbox x

Is This Answer Correct ?    3 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / testengineer

Thanku Mr.R.Singh,Miss Sumathi and Mr. Bantanahal Haribabu

But Could u please confirm me whether "MOD,INT,LEN" are Inbuilt Functions are not?

Is This Answer Correct ?    2 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / anil

s=4857
For i=Len(s) To 1 step-1
c=Mid(s,i,1)
temp=temp&c
Next
MsgBox temp

Is This Answer Correct ?    2 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / sumathi

var=4857
For i=1 to len(var)
x=var mod 10
num=num&x
var=var/10
var=fix(var)
Next
print num

Is This Answer Correct ?    1 Yes 0 No

int a=4857 i need output as 7584.without using any inbuild function?..

Answer / mogal

a = 4857

Do while ( a>0 )
num = a mod 10
a = a / 10
output = output & num
loop
print output

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?

1 Answers  


write a vb script to generate the following pattern ***** **** *** ** *

7 Answers   Blue Star,


Mention what is the technology used by vb script?

0 Answers  


how to retrieve native property value in runtime?

1 Answers   Hexaware,


Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.

12 Answers   Amazon, Pyroferus,






what is the features of visual basic?

0 Answers  


Both Static and dynamic arrays are handled by VB script. Is it true?

0 Answers  


write a program to display the system specifications of client system with the help of vb script.

1 Answers  


i want to when we will write the scripts either after getting the build or after getting the SRS?

3 Answers  


What is string concatenation function in VBScript?

2 Answers  


What is parametrization ?

9 Answers  


Explain what is loose binding? Why is it not a good practice to use it?

0 Answers  


Categories