Question: Q 4 ) Consider the following if statement in a program. Suppose this is the last statement and it will be executed. The other statements

Q4) Consider the following if statement in a program. Suppose this is the last statement and it will be executed. The other statements are not known.
if (marks >70)
print (pass)
Which of the following can be inferred?
a) If the text pass is printed on the console, the marks is greater than 70.
b) If the marks is greater than 70 then the text pass will be printed
c) If the text fail is printed on the console, then the marks is less than or equal to 70
d) If the text fail is printed on the console, then the marks is less than 70
Q5) How many rows are there in a truth table with 3 propositional variables?
a)2
b)4
c)8
d) Cannot be dettermined
Q6) p q -> r is equivalent to (hint: check precedence)
a) p (q -> r)
b)( p)(q -> r)
c)(( p) q)-> r
d)(p q -> r)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!