Home
SELF STUDY
BrowsePracticeTestsPlaylistDoubts & solutionsFree live classesOther courses

Programming Fundamentals in Python

Quick practice

Question 1 of 5

Consider the following if statement


if ((condition_1) && (condition_2) && ... (condition_n)) {

// do something

}


Where condition_1, condition_2, … condition_n are n independent boolean variables. You are given the following criteria:


(i) Every condition_i should be true or false at least once

(ii) For every condition_i there should be a pair of two test cases, such that only condition_i is different in the two and the result of the expression is different


Assume that you can give condition_1, condition_2, … condition_n as input to the program. The minimum number of test cases required to satisfy the above criteria are:

A

2^N

B

N+1

C

2N

D

2^(N-1)

Concepts

Get unlimited practice with Competitive Programming subscription

pick

Boost your performance with adaptive practice tests

pick

Practice every concept in the syllabus

pick

Compare your speed and accuracy with your peers

pick

Download the app and practice on the go