Exam UiPath-ADPv1 Topic 3 Question 181 Discussion
Actual exam question for UiPath's UiPath-ADPv1 exam
Question #: 181
Topic #: 3
Question #: 181
Topic #: 3
Given the following variables assignments:

What will the output of the following conditional be: outputX = If(CInt(doubleX+Cdbl(intX)
+CDbl(stringX))> 38.30, 1, 0)

What will the output of the following conditional be: outputX = If(CInt(doubleX+Cdbl(intX)
+CDbl(stringX))> 38.30, 1, 0)
Suggested Answer: B Vote an answer
The conditional statement attempts to convert all variables to Double and then adds them up to compare against 38.30. However, the string "9.1" cannot be directly converted to a Double with CDbl because it is not in a correct format that can be recognized as a number (it might be due to the fact that it's a string with a comma instead of a period for a decimal point, depending on the culture settings of the system). This will cause a runtime error during the execution of the conditional statement.References:
Microsoft Visual Basic Guide: Type Conversion Functions
Microsoft Visual Basic Guide: Type Conversion Functions
by apacheco05 at Feb 20, 2024, 06:17 PM
Contact Us
If you have any question please leave me your email address, we will reply and send email to you in 12 hours.
Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday
Support: Contact now
Comments
apacheco05
2024-02-20 18:17:51Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).