How many errors are present in the program given below? [code] void setup() { Serial.begin(9600); pinMode(10,OUTPUT); } void loop()

How many errors are present in the program given below?
Code:
void setup() {
    Serial.begin(9600);
    pinMode(10,OUTPUT);
}
void loop() {
    word x=1000;
}
A. 0
B. 1
C. 2
D. 3
 
Answer: A
Explanation: The program given above is completely fine. It simply initializes a variable ‘x’ of the word datatype. The word datatype is a datatype that can store any unsigned whole number or integer ranging from 0 to 65535. It has a memory allocation of 16 bits.
 

Tìm kiếm

Back
Top