Just making sure i answered these right. Question 1: An exclamation point follow
ID: 3727677 • Letter: J
Question
Just making sure i answered these right.
Question 1:
An exclamation point followed by a single equal symbol (!=) means .___________ ____________
Question 2:
Given the following declarations, identify what the result would be for each of the expressions:
int val1 = 10, val2 = 20, val3 = 0;
Expression Result
a. val1 > val2
b. val1 == 10
c. val1 != val3
d. (val1 > val2) || (val3 > val1)
e. !(val1 > val2) || (val3 > val1)
f. (val1 < val2) &&(val3 > val1)
g. (val1 < val2) &(val3 > val1)
h. “CS158” == “cs158”
Question 3:
The symbol (<) is:
the operator used to test for equality
one of the relational operators
normally used as part of an assignment statement
considered a logical compound operator
all of the above
Quesion 4:
The equality operator in C# is ______________
Question 5:
In C#, the && and || operators are called the _________-circuiting logical operators. These operators enable the computer to make fewer comparisons indicating as soon as the answer can be determined to produce the final result, move out of the conditional expression.
the operator used to test for equality
one of the relational operators
normally used as part of an assignment statement
considered a logical compound operator
all of the above
Quesion 4:
The equality operator in C# is ______________
Question 5:
In C#, the && and || operators are called the _________-circuiting logical operators. These operators enable the computer to make fewer comparisons indicating as soon as the answer can be determined to produce the final result, move out of the conditional expression.
Explanation / Answer
Question 1:
An exclamation point followed by a single equal symbol (!=) means : Not Equal to Symbol
Question 2:
Given int val1 = 10, val2 = 20, val3 = 0;
Expression
Result
Explanation
a
val1 > val2
false
val1 is less than val2
b
val1 == 10
true
val1 is 10
c
val1!= val3
true
val1 and val3 are not equal
d
(val1 > val2) || (val3 > val1)
false
(val1 > val2) is false and (val3 > val1) is also false so logical operator results false
e
!(val1 > val2) || (val3 > val1)
true
!(val1 > val2) is true and (val3 > val1) is also false so logical operator results true
f
(val1 < val2) &&(val3 > val1)
false
(val1 < val2) is true and (val3 > val1) is false so logical AND operator results false
g
(val1 < val2) &(val3 > val1)
false
(val1 < val2) is true and (val3 > val1) is false so bitwise AND operator results false
h
“CS158” == “cs158”
false
CS158 and cs158 both are different string
Question 3:
The symbol (<) is: one of the relational operators
Quesion 4:
The equality operator in C# is : ==
Question 5:
In C#, the && and || operators are called the Conditional AND Operator, and Conditional OR Operator respectively.
/*Hope this will help you. Thank you.*/
Expression
Result
Explanation
a
val1 > val2
false
val1 is less than val2
b
val1 == 10
true
val1 is 10
c
val1!= val3
true
val1 and val3 are not equal
d
(val1 > val2) || (val3 > val1)
false
(val1 > val2) is false and (val3 > val1) is also false so logical operator results false
e
!(val1 > val2) || (val3 > val1)
true
!(val1 > val2) is true and (val3 > val1) is also false so logical operator results true
f
(val1 < val2) &&(val3 > val1)
false
(val1 < val2) is true and (val3 > val1) is false so logical AND operator results false
g
(val1 < val2) &(val3 > val1)
false
(val1 < val2) is true and (val3 > val1) is false so bitwise AND operator results false
h
“CS158” == “cs158”
false
CS158 and cs158 both are different string
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.