Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

13. Which operator is a correct relational operator for inequality in ML? (A) /= (B) NOT= (C) != (D) 14. What is the result of

13. Which operator is a correct relational operator for inequality in ML? (A) /= (B) NOT= (C) != (D) <>

14. What is the result of the relational expression in Javascript below: "7" === 7 (A) true (B) false (C) null (D) unknown

15. Assume that the value of a is 19, and the value of b is 8. What is the result of the following Ruby expression? a *3<3*b (A) true (B) false (C) null (D) unknown

16. Which statement is wrong? (A) Boolean Expressions consist of Boolean variables, Boolean constants, Relational expressions, and Boolean operators (B) Adas AND and OR operators have equal precedence, but C-based languages assign a higher precedence to AND than OR (C) Assume that a =10, b=15, and c = 7. the result of evaluating C99 expression a > b > c is zero. (D) Ruby, have two sets of the binary logic operators, e.g., && and and for AND(|| and or for OR. ). The spelled versions have higher precedence.

17. Which statement is wrong? (A) A short-circuit evaluation of an expression is the one in which the result is determined without evaluating all of the operands and/or operators (B) The value of the Boolean expression (a <= 0) || (b < 10) is independent of the 2nd relational expression, if a > 0 (C) Ada has specific short-circuit evaluation of the Boolean operators AND and OR. (D) All of the logical operators of Ruby, Perl, ML, F#, and Python are short-circuit evaluated

18. Assume that a C++ variable age = 8; then the value of the expression -age++ is________ (A) -8 (B) -9 (C) 10 (D) 11

19. Assume that a C++ variable age = 8; then the value of the expression age++ is________ (A) 8 (B) 9 (C) 10 (D) 11

20. Given a C skeletal below, while (ch = getchar() != EOF) { ... } which statement is ? (A) The code is wrong, as the expression, ch = getchar(), should be placed in parentheses. (B) The code is totally right. (C) Without the parentheses, the new character would be compared with ch first. (D) The code is wrong, as the expression, getchar() != EOF, should be placed in parentheses.

21. Given Perl code below: ($first, $second, $third) = (20, 40, 60); $third = $second + $first * 2; print $third; what is the value of $third from the print statement? (A) 20 (B) 40 (C) 80 (D) 100

22. Assume that three C++ variables: x = 10, y=8, and z =5; then what is the value of the following Boolean expression? (x=y)&&(z<10) (A) 0 (B) 1 (C) 10 (D) 18

23. Which statement is correct? (A) Perl does not allow coercion rules for mixed-mode assignment similar to mixed-mode expressions. (B) C# does not allow mixed-mode assignment. (C) Java and Ada allow mixed-mode assignment only if the required coercion is widening. (D) In functional languages, where assignments are just used to name values, there is no such thing as a mixed-mode assignment.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

2. Explain how the role of training is changing.

Answered: 1 week ago

Question

7. General Mills

Answered: 1 week ago