Report Bug

Qus

Predict the output of the following code if the object is moving away from the sensor

int op = 7;
int isBarrier = HIGH;
void setup() 
{
	pinMode(op, INPUT);
	Serial.begin(9600);
}
void loop() 
{
	isBarrier = digitalRead(op);
	if (isBarrier == LOW)
	{
		Serial.println("1+");
	}
	else
	{
		Serial.print("clear+");
	}
	delay(100);
}
Qus

यदि ऑब्जेक्ट सेंसर से दूर जा रहा है तो निम्न कोड का आउटपुट की बताए ?

int op = 7;
int isBarrier = HIGH;
void setup() 
{
	pinMode(op, INPUT);
	Serial.begin(9600);
}
void loop() 
{
	isBarrier = digitalRead(op);
	if (isBarrier == LOW)
	{
		Serial.println("1+");
	}
	else
	{
		Serial.print("clear+");
	}
	delay(100);
}


A. clear+clear+1+1
B. 1+1+clear+clear
C. clear+clear+clear+clear
D. 1+1+clear+1


Solution
D. 1+1+clear+1



CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad