This set of IOT Multiple Choice Questions & Answers (MCQs) focuses on “Handling Sensor Request”.
1. HelloWeb is an example of ____________ server.
a) HTTP
b) MQTP
c) SMTP
d) CoAP
View Answer
Explanation: HelloWeb is an example of an HTTP server, but it does not use any sensors or actuators.
2. ________ will show how to handle GET request to a sensor resources.
a) Monitor
b) VoltageMonitor
c) Voltage
d) Voltage-Monitor
View Answer
Explanation: VoltageMonitor, shows how to handle GET request to a sensor resource, more specially one that represent some voltage.
3. Can we use any web browser as client.
a) True
b) False
View Answer
Explanation: You can use any web browser as a client to inspect the current voltage. After all, a web browser is basically an engine for initiating GET request.
4. An HTTP server manages ____________
a) Websites
b) Devices
c) Resources
d) Sensors
View Answer
Explanation: An HTTP server manages resources. In this example, a resource is provided that has the meaning, “actual voltage value, as measured by a sensor attached to the board”.
5. A resource that contains an actual value is called as ________
a) Potential variable
b) Measured variable
c) Resource variable
d) Physical variable
View Answer
Explanation: A resource that contains an actual value is called a measured variable. A measured variable changes its value over time, depending on a physical process.
6. When the user turns the potentiometer’s knob, the value is changed.
a) True
b) False
View Answer
Explanation: When the user physically turns the potentiometer’s knob, the measured variable changes its value accordingly. This means that subsequent GET request to the same resource may yield different responses.
7. A resource with measured variable will reflect ________
a) Potential phenomenon
b) Resource phenomenon
c) Measured phenomenon
d) Physical phenomenon
View Answer
Explanation: A resource with measured variable will reflect a physical phenomenon as it currently is. The resource is updated with new sensor values from time to time.
8. What should an URL contain?
a) ASCII values
b) Digits
c) Characters
d) ASCII values, digits, and characters
View Answer
Explanation: You can use any URL as long you use ASCII letters, digits, and Characters. For example, the URL /root/sensor/analog/I would look like:
http://192.168.5.100/root/sensor/analog/1.
9. For reading the current voltage ________ library class is used.
a) Digital sensor
b) Analog sensor
c) Actuator
d) Potential sensor
View Answer
Explanation: For reading the current voltage, library class Analog Sensor is used that wraps an analog input port in an object that provides the method HandleGet.
10. Variable voltage Sensor is an instance of Analog Sensor.
a) True
b) False
View Answer
Explanation: For reading the current voltage, library class Analog Sensor that wraps an analog input port in an object that provides the method HandleGet.
Variable voltage Sensor is an instance of Analog Sensor, initialized with pinA1.
11. Which property makes it possible for the analog sensor object to convert the integer input?
a) MinValue
b) MaxValue
c) Either MinValue or MaxValue
d) Both MinValue and MaxValue
View Answer
Explanation: Properties MinValue and MaxValue make it possible for the analog sensor object to convert the integer input of the analog input port to a value in the given range.
12. What is the range of analog input port?
a) 0 to 3
b) 0 to 3.3
c) 0 to 4
d) 0 to 4.5
View Answer
Explanation: Properties MinValue and MaxValue make it possible for the analog sensor object to convert the integer input of the analog input port to a value in the given range which is between 0.0 to 3.3.
13. ________ is used to provide an object of type MeasuredVariable.
a) HandleRequest
b) RequetHandle
c) Handle_Request
d) Handle-Request
View Answer
Explanation: In the WebServer initialization, We use the request handler HandleRequest provided by an object of type MeasuredVariable. A MeasuredVariable object has a property FromSensor.
14. When a client makes a GET request for /voltage/actual, the request is passed to ________
a) MeasuredVariable
b) HandleRequest
c) Measured Variable’s HandleRequest
d) HandleRequest’s MeasuredVariable
View Answer
Explanation: When a client makes a GET request for /voltage/actual, the request is passed to Measured Variable’s HandleRequest method. When this happens, the MeasuredVariable object first calls FromSensor.
15. Delegate properties must be compatible with the delegate types they represent.
a) True
b) False
View Answer
Explanation: FromSensor is a property to which you can assign a method I.e., a C#delegate property. Delegate properties must be compatible with the delegate types they represent.
Sanfoundry Global Education & Learning Series – IOT.
To practice all areas of IOT, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Computer Science Books
- Check Programming Books
- Check IOT Books
- Apply for Computer Science Internship
- Practice Programming MCQs