top of page
Writer's pictureRajesh Singh

IOT Arduino MCQ

Updated: 20 minutes ago

Building IOT Applications MCQ:


Q1. Which Microcontroller is used in Arduino UNO prototyping board?

A.    ATmega328m

B.     ATmega328p

C.     ATmega2560

D.    None of Above

Ans: B

Q2. What is the use of the Interrupt Service Routine in an Arduino ?

A.    To boot up the Arduino

B.     To exit any code that is running

C.     To automate functions

D.    To make more memory

Ans: C

Q3. What will be the output of the following code?

#include <stdio.h>

void solve() {

 char ch[5] = "abcde";

int ans = 0;

for(int i = 0; i< 5; i++) {

ans += (ch[i] - 'a');

 }

printf("%d", ans);

}

int main() {

solve();

return 0;

}

A.    5

B.     20

C.     40

D.    10

Ans: D

Q4. A set of homogenous data stored in consecutive memory locations is called:

A.    List

B.     Structure

C.     Array

D.    Union

Ans: C

Q5. How can you throw an error with preprocessor directives to Arduino compiler, forcing to stop compilation?

A.    #warning

B.     #stop

C.     #cut

D.    #error

Ans: D

Q6. The process of assessment of the speaker’s content while listening is called __________.

A.    Critical listening

B.     Dialogic listening

C.     Comprehensive listening

D.    Systematic listening

Ans: A

Q7. How should the tone of a speaker be like?

A.    Loud

B.     Clear

C.     Low

D.    Soft

Ans: B

Q8. What is the correct execution process of an Arduino code ?

A.    Preprocessor->Editor->Compiler

B.     Editor->Preprocessor->Compiler

C.     Compiler->Preprocessor->Editor

D.    Editor->Compiler->Preprocessor

Ans: B

Q9. What is the bit size used in 8051 ?

A.    4-bit

B.     8-bit

C.     16-bit

D.    32-bit

Ans: B

Q10. What type of signal does the analogWrite() function output ?

A.    Pulse Code Modulated Signal

B.     Frequency Modulated Signal

C.     Pulse Width Modulated Signal

D.    Pulse Amplitude Modulated Signal

Ans: C

Q11. During embedded design, which design considers both hardware and software?

A.    Memory Design

B.     Software / hardware Design

C.     Platform-based Design

D.    Peripheral Design

Ans: B

Q12. Which of the following is used to upload the Arduino Sketches to the board?

A.    avrgcc

B.     g++

C.     cpython

D.    avrdude

Ans: D

Q13. What is the size of RAM memory in 8051?

A.    32 bytes

B.     64 bytes

C.     128 bytes

D.    256 bytes

Ans: C

Q14. Functions can pass information in which of the following ways ?

A.    Value

B.     Reference

C.     Stack

D.    Both (A) and (B)

Ans: D

Q15. 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);

}

A.    clear+clear+1+1

B.     1+1+clear+clear

C.     clear+clear+clear+clear

D.    1+1+clear+1

Ans: D

Q16. This is a combination of hardware and software to perform a specific task.

A.    IoT System

B.     Embedded System

C.     Grid System

D.    Cloud System

Ans: B

Q17. What are Arduino Codes are referred to?

A.    sketches

B.     drawings

C.     links

D.    notes

Ans: A

Q18. Which of the following method is better for task swapping in the embedded systems? एंबेडेड सिस्टम में टास्क स्वैपिंग के लिए निम्नलिखित में से कौन सी विधि बेहतर है?

A.    time slice

B.     RMS

C.     cooperative multitasking

D.    pre-emptive

Ans: D

Q19. The scope that hacker can use to break into a system is called as :

A.    Attack surface

B.     Defense

C.     Principle of least privilege

D.    Risk mitigation

Ans: A

Q20. Which of the following is the property of embedded C language? निम्नलिखित में से कौन सा एंबेडेड C भाषा का गुण है?

A.    Hardware independent

B.     Used for web applications

C.     Used with limited resources

D.    Used for native development

D.

Ans: C

Q21. Embedded C is:

A.    A subset of traditional C

B.     An extension of traditional C

C.     A superset of traditional C

D.    Same as traditional C

Ans: B

Q22. What is the outcome of the following

Arduino code ?

void setup() {

Serial.begin(9600);

}

void setup() {

Serial.write(20);

}           

A.    Send a signal to pin 20 on the Arduino board

B.     Send a octal number of 20 through the Serial pins

C.     Send a byte with value 20 through the Serial pins

D.    Send a hexadecimal number of 20 through the Serial pins

Ans: C

Q23. Which of the following is NOT a data type ?

A.    sbit

B.     dbit

C.     bit

D.    unsigned int

Ans: B

Q24. What is the functions preprocessor directive in Embedded C programming?

A.    Tell compiler where to find symbols that are not present in program

B.     Give compiler instructions to compile the program

C.     Define variables

D.    Define functions

Ans: A

Q25. Predict the output of the following code if the object is moving towards the sensor.

int op = 6;

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+1

C.     1+1+clear+clear

D.    clear+clear+clear+clear

 

Ans: D

Q26. What is the output of below code?

#include<EEPROM.h>

int pin=13;

void setup()

{

pinMode(pin,OUTPUT);

Serial.begin(9600);

{

void loop()

for(int i=0;i<EEPROM.Length();i++)

{

EEPROM.write(i,1)

digitalWrite(pin,HIGH;

exit(0);

}

}

A. Clear EEPROM

B. Fill EEPROM with 1's

C. Expor EEPROM data

D. Fill EEPROM with 0's

Ans: B


14 views0 comments

Recent Posts

See All

Introduction to IOT MCQ

Introductions to IOT MCQs Q1. Which is not a standard protocol used in IOT domain? A.      Wifi B.      Z-wave C.      Zigbee D.     ...

IT Tools and Network Basics MCQ

Q1. Presentation file created in LibreOffice Impress is saved with the extension….   लिब्रे ऑफिस इंप्रेस में बनाई गई प्रेजेंटेशन फ़ाइल...

bottom of page