T24 861 – SPECIMEN 6 of 10(xix) Assertion(A): call by value is known as pure methodReason(R): The original value of variable does not change as operation isperformed on copied values.(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correctexplanation of Assertion (A)(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not acorrect explanation of Assertion (A)(c) Assertion (A) is false and Reason (R) is true(d) Assertion (A) is false and Reason (R) is true(xx) What Will be the output for:System.out.print(Character.toLowerCase('1'));(a) 0(b) 1(c) A(d) true
Question
T24 861 – SPECIMEN 6 of 10(xix) Assertion(A): call by value is known as pure methodReason(R): The original value of variable does not change as operation isperformed on copied values.(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correctexplanation of Assertion (A)(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not acorrect explanation of Assertion (A)(c) Assertion (A) is false and Reason (R) is true(d) Assertion (A) is false and Reason (R) is true(xx) What Will be the output for:System.out.print(Character.toLowerCase('1'));(a) 0(b) 1(c) A(d) true
Solution
(xix) The correct answer is (b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A). While it's true that in call by value, the original value of the variable does not change because the operation is performed on copied values, this is not the reason why call by value is known as a pure method. A pure method is a method that does not change the state of an object and produces the same output for the same input.
(xx) The correct answer is (b) 1. The Character.toLowerCase() method converts all the uppercase characters in a string to lowercase. However, '1' is not an uppercase character, so the method will return it as it is.
Similar Questions
Directions : In the following questions, a statementof Assertion (A) is followed by a statement ofReason (R). Mark the correct choice as:(A) Both Assertion (A) and Reason (R) are true,and Reason (R) is the correct explanation ofAssertion (A).(B) Both Assertion (A) and Reason (R) are true,but Reason (R) is not the correct explanation ofAssertion (A).(C) Assertion (A) is true, but Reason (R) is false.(D) Assertion (A) is false, but Reason (R) is true.Q. 1. Assertion (A): Management is a systematic body ofknowledge.Reason (R): Management has its own theory andprinciples that have developed over a period oftim
Assertion(A): List is an immutable data typeReasoning(R): When an attempt is made to update the value of an immutable variable, the old variable isdestroyed and a new variable is created by the same name in memory.
(R) is not the correct explanation of Assertion (A).
Assertion(A): Python Standard Library consists of various modules.Reasoning(R): A function in a module is used to simplify the code andavoids repetition
Assertion (A): The point (0, 4) lies on y-axis.Reason(R): The x-coordinate of a point on y-axis is zero(a) Both assertion (A) and reason (R) are true and reason (R) is the correctexplanation of assertion (A).(b) Both assertion (A) and reason (R) are true but reason (R) is not the correctexplanation of assertion (A).(c) Assertions (A) is true but reason (R) is false.(d) Assertions (A) is false but reason (R) is true.20. Assertion (A): The HCF of two numbers is 5 and their product is 150. Then their LCMis 40.Reason(R): For any two positive integers a and b, HCF (a, b) x LCM (a, b) = a x b.(a) Both assertion (A) and reason (R) are true and reason (R) is the correctexplanation of assertion (A).(b) Both assertion (A) and reason (R) are true but reason (R) is not the correctexplanation of assertion (A).(c) Assertions (A) is true but reason (R) is false.(d) Assertions (A) is false but reason (R) is true
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.