wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CPE251.ME

Total questions: 50

Worksheet time: 38mins

Name
Class
Date
1.

Which of the following option is true?

a)

If the Sun is a planet, elephants will fly

b)

3 +2 = 8 if 5-2 = 7

c)

1 > 3 and 3 is a positive integer

d)

-2 > 3 or 3 is a negative integer

2.

Let P: If Sahil bowls, Saurabh hits a century.; Q: If Raju bowls, Sahil gets out on first ball. Now if P is true and Q is false then which of the following can be true?

a)

Raju bowled and Sahil got out on first ball

b)

Raju did not bowled

c)

Sahil bowled and Saurabh hits a century

d)

Sahil bowled and Saurabh got out

3.

Which of the following option is suitable, if A is “10110110”, B is”11100000” and C is”10100000”?

a)

C=A or B

b)

C=~A

c)

C=~B

d)

C=A and B

4.

If A is “001100” and B is “010101” then what is the value of A (Ex-or) B?

a)

000000

b)

111111

c)

001101

d)

011001

5.

What is the one’s complement of this string “01010100”?

a)

10101010

b)

00110101

c)

10101011

d)

10101001

6.

If P is always against the testimony of Q, then the compound statement P→(P v ~Q) is a __________

a)

Tautology

b)

Contradiction

c)

Contingency

d)

None of the mentioned

7.

Let domain of m includes all students, P (m) be the statement “m spends more than 2 hours in playing polo”. Express ∀m ¬P (m) quantification in English.

a)

A student is there who spends more than 2 hours in playing polo

b)

There is a student who does not spend more than 2 hours in playing polo

c)

All students spends more than 2 hours in playing polo

d)

No student spends more than 2 hours in playing polo

8.

Which rule of inference is used in each of these arguments, “If it is Wednesday, then the Smartmart will be crowded. It is Wednesday. Thus, the Smartmart is crowded.”

a)

Modus tollens

b)

Modus ponens

c)

Disjunctive syllogism

d)

Simplification

9.

What rule of inference is used in this argument?

“If I go for a balanced diet, then I will be fit. If I will be fit, then I will remain healthy. Therefore, if I go for a balanced diet, then I will remain healthy.”

a)

Modus tollens

b)

Modus ponens

c)

Disjunctive syllogism

d)

Hypothetical syllogism

10.

p ∧ q is logically equivalent to ________

a)

¬ (p → ¬q)

b)

(p → ¬q)

c)

(¬p → ¬q)

d)

(¬p → q)

11.

Which of the following statement is correct?

a)

p ∨ q ≡ q ∨ p

b)

¬(p ∧ q) ≡ ¬p ∨ ¬q

c)

(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)

d)

All of mentioned

12.

The ten switches A, B, C, D, E, F, G, H, N, M are placed in the given circuit (all are open at a given time). If you close one switch you need to pay 1 unit cost.  What is the cost you need to pay to glow this Lamp.

a)

2 units

b)

4 units

c)

3 units

d)

1 unit

13.

Let P, Q, R be true, false, false, respectively, which of the following is true?

a)

Q↔(P∧R)

b)

P↔(Q∨R)

c)

P∧(Q∧¬R)

d)

(P→Q)∧¬R

14.

The Ex-nor of this string “01010101” with “11111111” is?

a)

00110100

b)

10101010

c)

01010101

d)

10101001

15.

Which of the following represents: ¬R (negation of R) if R stands for “I like badminton but hate math”?

a)

I do not like badminton or math

b)

I dislike badminton but love math

c)

I hate badminton and math

d)

I hate badminton or like math

16.

What rules of inference are used in this argument?  “All students in this science class as taken a course in physics” and “Mary is a student in this class” imply the conclusion “Mary as taken a course in physics.”

a)

Existential generalization

b)

Universal instantiation

c)

Existential instantiation

d)

Universal generalization

17.

The statement (¬P↔Q)∧¬Q is true when?

a)

P: False, Q: False

b)

P: True, Q: True

c)

P: True, Q: False

d)

P: False, Q: True

18.

In boolean algebra, the OR operation is performed by which properties?

a)

Associative properties

b)

Commutative properties

c)

Distributive properties

d)

All of the Mentioned

19.

In the circuit shown the lamp will be glowing if _______.

a)

P: True, Q: False

b)

P: True, Q: True

c)

P: False, Q: False

d)

None of the mentioned

20.

One of De Morgan's theorems states that ¬(A + B) =¬A x ¬B . Simply stated, this means that logically there is no difference between:

a)

a NOR and an AND gate with inverted inputs.

b)

a NAND and an OR gate with inverted inputs.

c)

an AND and a NOR gate with inverted inputs.

d)

a NOR and a NAND gate with inverted inputs.

21.

Which of the following statement regarding sets is false?

a)

A ∪ A = A

b)

(A ∪ B)’ = A’ ∪ B’

c)

A – (B ∩ C) = (A - B) ∪ (A – C)

d)

A ∩ A = A

22.

Let the sets be A, B, C, D then (A B) X (C D) is equivalent to ______.

a)

(A X D) (B X C)

b)

(A X C) (B X D)

c)

None of the mentioned

d)

(A X C) (B X D)

23.

The set O of odd positive integers less than 10 can be expressed by ____.

a)

{1, 2, 5, 9}

b)

{1, 2, 3}

c)

{1, 3, 5, 7, 9}

d)

{1, 5, 7, 9, 11}

24.

Let set A = {1, 2} and B = {3, 4}, then A X B is ____.

a)

{(3, 1), (4, 1)}

b)

{(1, 3), (2, 4)}

c)

{(1, 3), (2, 4), (1, 4), (2, 3)}

d)

{1, 2, 3, 4}

25.

Which of the following function f: Z X Z → Z is not onto?

a)

f(a, b) = a + b

b)

f(a, b) = a – b

c)

f(a, b) = |b|

d)

f(a, b) = a

26.

If set A as 3 elements then number of elements in A X A X A are _______.

a)

19

b)

27

c)

9

d)

6

27.

Which of the following sequences in Ap will have common difference 3, where n is an integer?

a)

an = 2n2 + 3

b)

an = 3n2 + 3n

c)

an = 2n2 + 3n

d)

an = 5 + 3n

28.

Let A order (a x b) and B order (c x d) be two matrices, then if AB exists, the order of AB is?

a)

a x b

b)

b x c

c)

a x d

d)

c x d

29.

For matrix A and a scalar k, (kA)T is equal to _____.

a)

k(A)T

b)

k2(A)

c)

k(A)

d)

k2(A)T

30.

Let the sequence be 1x2, 3x22, 5x23, 7x24, 9x25 ……. then the next term of this AGP is given by _____.

a)

10x26

b)

None of the mentioned

c)

10x27

d)

11x26

31.

Where is linear searching used?

a)

When the list has only a few elements

b)

When performing a single search in an unordered list

c)

Used all the time

d)

When the list has only a few elements and When performing a single search in an unordered list

32.

What is the best case for linear search?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(1)

33.

What is the worst case for linear search?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(1)

34.

Which of the following is not an application of binary search?

a)

To find the lower/upper bound in an ordered sequence

b)

Union of intervals

c)

Debugging

d)

To search in unordered list

35.

What is the time complexity of the Quick search algorithm?

a)

O(n)

b)

O(log n)

c)

O(m+n)

d)

O(mn)

36.

What is the space complexity of quick search algorithm?

a)

O(n)

b)

O(log n)

c)

O(m+n)

d)

O(mn)

37.

A procedure for solving a problem in terms of actions and their order, is called as

a)

Program instructions

b)

Algorithm

c)

Template

d)

All of the choices

38.

An artificial and informal language that helps programmers to develop algorithms, is called

a)

Instruction code

b)

Algocode

c)

Pseudocode

d)

Control code

39.

Specifying the order in which statements are to be executed in a program is called

a)

Program control

b)

Program counter

c)

Program order

d)

Program flow

40.

For a binary search algorithm to work, it is necessary that the array (list) must be

a)

sorted

b)

unsorted

c)

in a heap

d)

popped out of stack

41.

What will be the plain text corresponding to ciphered text “rmw ” if an affine cipher is used with key values as a=5, b=10?

a)

csk

b)

kkr

c)

srt

d)

msd

42.

What will be the ciphered text corresponding to plain text “sanfoundry” if an affine cipher is used with key values as a=5, b=10?

a)

wkxjcgxzra

b)

gkxteuxfzw

c)

ukxhmyxdfg

d)

rfsexbsumv

43.

Which of the following statements is logically equivalent to the statement, “If a and b ≠ 0 are rational numbers and r ≠ 0 is an irrational number, then a + br is irrational.”

a)

If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is rational only if r is irrational.

b)

If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is irrational only if r is irrational.

c)

If a and b ≠ 0 are rational and r ≠ 0 is real, then r is rational only if a + br is rational.

d)

If a and b ≠ 0 are rational and r ≠ 0 is real, then a + br is rational only if r is rational.

44.

Which of the following statements is true:

a)

A number k divides the sum of three consecutive integers n, n + 1, and n + 2 if

and only if it divides the middle integer n + 1.

b)

An integer n is divisible by 6 if and only if it is divisible by 3.

c)

For all integers a, b, and c, a | bc if and only if a | b and a | c.

d)

 If r and s are integers, then r | s if and only if r2 | s2

45.

Which of the following statements is true:

a)

A number is rational if and only if its square is rational.

b)

An integer n is odd if and only if n2 + 2n is odd.

c)

A number is irrational if and only if its square is irrational.

d)

At least one of two numbers x and y is irrational if and only if the product xy is irrational.

46.

"A key is a string of bits used by a cryptographic algorithm to transform plain text into ciphertext." Which of the following is capable of becoming a key in a cryptographic algorithm?

a)

An integer values

b)

A square matrix

c)

An array of characters (i.e. a string)

d)

All of the mentioned

47.

Cipher in cryptography is ___________.

a)

Encrypted message

b)

Algorithm for performing encryption and decryption

c)

Both algorithm for performing encryption and decryption and encrypted message

d)

Decrypted message

48.

The solution of the linear congruence 4x = 5(mod 9) is?

a)

6(mod 9)

b)

8(mod 9)

c)

9(mod 9)

d)

10(mod 9)

49.

The inverse of 19 modulo 141 is?

a)

50

b)

51

c)

54

d)

52

50.

In which cipher each letter of the plaintext is substituted by any other letter to form the cipher message?

a)

Shift cipher

b)

DES encryption

c)

Block cipher

d)

AES encryption