Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Internet of Things (IoT) CIA

Duration: 60 Minutes Maximum Marks: 50


Questions: All the questions are compulsory

General Instructions:
If there is a syntactical mistake, specify which line of code causes an error and why.
If there is an infinite loop, then give the values for the first iteration and then specify
infinite loop.
If more than one option is correct, mark all the options.
Justification needed for True / False or Yes / No questions.
Answers should be written in a separate A4 sheet.
If any malpractice is found, CIA will be evaluated to zero.

SECTION A (2x22=44)

1. What will be the output of this program?


byte numberOne=150;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(numberOne>150 && numberOne++);
Serial.println(numberOne);
}

2. Datatypes are keywords


Keywords are lowercase
a) All the keywords are datatypes c) Not all the keywords are
b) All the datatypes are keywords lowercase

3. What will be the output of this program?


short a=10;
void setup() {
}
void loop() {
Serial.begin(9600);
Serial.println(a);
delay(1500);
}
4. IDE stands for ______________________________________________.
5. setup() will be executed only when Arduino gets powered. [ True / False ]
6. There is a terminating condition for loop(). [ True / False ]
7. The important component of Arduino Uno is _________________.
8. The object code, which is in 0s and 1s, uploaded to Arduino chip. [ True / False ]
9. Tinkercad is a _____________________ for designing Arduino circuits.
10. ____________ is the extension of Arduino source file.
11. The Arduino programs are called ______________.
12. The task of compiler is _______________________________________________.
13. delay(ms) is ___________ function.
14. Why Serial.begin(rate) needed?
15. Range of Byte is ______________.
16. Can you store 65536 in unsigned integer? [ Yes / No ]
17. Both float and double treated as same in Arduino Uno [ Yes / No ]
18. Give an example of loss of data when you choose particular datatype and try to store
some value which is beyond?
19. String is a derived Datatype [ True / False ]
20. Identify valid and invalid variable names. [ a) INT b) 1_inT c) _INT ]
21. The following declaration is correct. [ constant int a = 10; ]
22. What will be the output of this program?
byte opt=1;
void setup() { Serial.begin(9600); }
void loop() {
switch(opt){
case 1 : Serial.println(Arduino);
case 2 : Serial.println(Programming);
default: Serial.println(CIA 1);
}
}

SECTION B (3x2=6)

1. Write a function to find the square of a given number and return it.
2. Write a program to find the largest of any two numbers.

You might also like