O Level Internet of Things Paper January 2024
सुरक्षित एमक्यूटीटी के लिए मानक पोर्ट नंबर है:
Standard port number for secure MQTT is:
- Port 8883: This is the standard port used for MQTT communication when encryption is enabled using TLS/SSL.
- Port 1883: This is the default port for non-secure MQTT communication.
Correct Answer: D) 8883
C में सही वेरिएबल कौन सा है?
Which is the correct variable in C?
In C, a variable name must follow certain rules:
- It can start with a letter (a-z, A-Z) or an underscore (_).
- It can contain letters, digits (0-9), and underscores.
- It cannot start with a digit or contain special characters like
!,-, or#.
Let's evaluate each option:
- (A) Variable!: Invalid because
!is not allowed in variable names. - (B) -Variable: Invalid because a variable name cannot start with a hyphen (
-). - (C) _Variable: Valid. Variable names can start with an underscore.
- (D) Variable#: Invalid because
#is not allowed in variable names.
Correct Answer:
(C) _Variable.
Correct Answer: C) _Variable
____________ 16 बिट माइक्रोकंट्रोलर का एक उदाहरण है।
____________ is an example of 16 bit microcontroller.
The 8031 Microcontroller is an example of a 16-bit microcontroller.
- 8031: It is based on a 16-bit architecture and is widely used for various embedded applications.
- 8051: It is an 8-bit microcontroller, not a 16-bit microcontroller.
- 8096: This is a 16-bit microcontroller, making it another valid example.
However, 8031 is specifically designed as a 16-bit microcontroller, while 8096 is also a 16-bit but might not be as commonly referenced in some contexts.
Correct Answer:
(C) 8096 Microcontroller.
Correct Answer: C) 8096 Microcontroller
Arduino Uno में प्रयुक्त माइक्रोकंट्रोलर क्या है?
What is the microcontroller used in Arduino Uno ?
The Arduino Uno uses the ATmega328p microcontroller.
Correct Answer:
(A) ATmega328p.
Correct Answer: A) ATmega328p
निम्नलिखित प्रोग्राम का आउटपुट क्या है?
What is the output of the following program?
void setup() {
String my_str = "This is the sentence";
Serial.begin(9600);
my_str.replace("sentence", "Arduino sketch");
Serial.println(my_str);
}
void loop() { }
Let's analyze the given program:
Code:
void setup() {
String my_str = "This is the sentence";
Serial.begin(9600);
my_str.replace("sentence", "Arduino sketch");
Serial.println(my_str);
}
void loop() { }
Explanation:
- The program defines a String variable
my_strwith the value"This is the sentence". - It then calls the
replace()function, which replaces the word "sentence" with "Arduino sketch". - Finally, it prints the updated string using
Serial.println().
Outcome:
- The word "sentence" is replaced by "Arduino sketch", so the resulting string will be:
"This is the Arduino sketch"
Correct Answer:
(C) “This is the Arduino Sketch”.
Correct Answer: C) “This is the Arduino Sketch”
किसी सरणी के 10वें तत्व "a" को ___________ के रूप में एक्सेस किया जा सकता है
The 10th element of an array “a‟ can be accessed as ___________
In C and many other programming languages, array indices start from 0. So, the 10th element of the array would be accessed at index 9.
Correct Answer:
(B) a[9].
Correct Answer: B) a[9]
नीचे दिए गए कोड में कितनी त्रुटियाँ मौजूद हैं?
How many errors are present in the code given below?
int i=10;
void setup() {
pinMode(i,OUTPUT);
digitalwrite(HIGH);
}
void loop() {
//Do Nothing.
}
ऐरे वाले C प्रोग्राम का सही विकल्प चुनें:
Choose the correct option of C program having array:
int main ()
{ int xyz (4) = [10,20,30,40];
printf (“%d”, xyz (1)); }
एकल ईथरनेट फ़्रेम की अधिकतम लंबाई
Maximum length of single Ethernet frame
The maximum length of a single Ethernet frame, according to the IEEE 802.3 standard, is 1500 bytes for the payload (data). The total size of the Ethernet frame, including headers and trailers, can go up to 1518 bytes.
Correct Answer:
(B) 1500 byte.
Correct Answer: B) 1500 byte
इनमें से कौन सा PWM पिन नहीं है?
Which of these is not a PWM pin?
In Arduino Uno, PWM (Pulse Width Modulation) pins are the ones that can generate a variable duty cycle signal, often used for controlling motors, LEDs, etc.
The PWM pins on the Arduino Uno are:
- 3, 5, 6, 9, 10, and 11.
Analysis of options:
- (A) 3: This is a PWM pin.
- (B) 9: This is a PWM pin.
- (C) 6: This is a PWM pin.
- (D) 8: This is not a PWM pin.
Correct Answer:
(D) 8.
Correct Answer: A) 3
निम्नलिखित Arduino कोड का आउटपुट क्या होगा?
What will be the output of the following Arduino code?
#define X 10;
void setup(){
X=0;
Serial.begin(9600);
Serial.print(X);
}
void loop(){
//Do nothing…
}
The code tries to change the value of X, which is defined as a constant using #define. Constants cannot be reassigned, so the line X = 0; causes a compilation error.
Correct Answer:
(D) Error.
Correct Answer: D) Error
नीचे दिए गए कोड का उद्देश्य क्या है यदि इसे Arduino Uno पर निष्पादित किया जाता है?
What is the objective of the code given below if it is executed on the Arduino Uno ?
#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);
}
The code writes the value 1 to every location in the EEPROM of the Arduino Uno, filling the entire EEPROM with 1's. It also turns on the LED connected to pin 13 and then exits the program.
Correct Answer:
(B) Fill EEPROM with 1's.
Correct Answer: B) Fill EEPROM with 1's
फ़ंक्शंस के साथ C प्रोग्राम का आउटपुट क्या है?
What is the output of C program with functions?
int main() {
int a = 0;
printf("AJAY ");
return 1;
printf("VIJAY");
return 1;
}
Let's analyze the given C program:
Code:
int main() {
int a = 0;
printf("AJAY ");
return 1;
printf("VIJAY");
return 1;
}
Explanation:
printf("AJAY ");: This prints the string "AJAY " to the console.return 1;: Thereturnstatement causes the function to exit, so the program ends here. After the firstreturn 1;, the program will terminate, and the secondprintf("VIJAY");will never be executed.- The second
return 1;is unreachable code because the function has already returned at the firstreturn 1;.
Conclusion:
- The program prints only "AJAY ", and the code after the first
returnis not executed, so "VIJAY" will not be printed.
Correct Answer:
(B) AJAY.
Correct Answer: B) AJAY
निम्नलिखित कोड का आउटपुट क्या होगा?
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;
}
The program calculates the sum of the differences between the ASCII values of characters in the string "abcde" and the ASCII value of 'a'.
- For each character (
'a','b','c','d','e'), it calculates the difference with'a'and adds it toans. - The sum of these differences is
0 + 1 + 2 + 3 + 4 = 10.
Correct Answer:
(D) 10.
Correct Answer: D) 10
दिए गए C कोड में, लूप के लिए निष्पादित होता है:
In the given C code, for loop executes for:
#include
void main ()
{
int x=10;
for ( ; ; )
{
printf(“%d\n”,x):
}
}
Let's analyze the provided C code:
Code:
#include
void main() {
int x = 10;
for ( ; ; ) {
printf("%d\n", x);
}
}
Explanation:
-
For Loop Structure: The
forloop in the code has no condition specified:- The typical structure of a
forloop is:for(initialization; condition; increment/decrement). - In this case, there is no initialization, no condition, and no increment or decrement. This effectively makes it an infinite loop since there is no termination condition.
- The typical structure of a
-
Inside the Loop:
- The value of
x(which is 10) is printed repeatedly in an infinite loop, with no condition to stop it.
- The value of
Conclusion:
- The loop will run forever because there is no exit condition.
Correct Answer:
(C) infinite.
Correct Answer: C) infinite
निम्नलिखित कोड का आउटपुट क्या होगा?
What will be the output of the following code ?
#include <stdio.h>
void solve() {
int b = 4;
int res = b++ + ++b + ++b;
printf("%d", res);
}
int main() {
solve();
return 0;
}
The expression b++ + ++b + ++b evaluates as follows:
b++uses the value ofb(4) and increments it to 5.++bincrementsbto 6, then uses it.++bincrementsbto 7, then uses it.
So, the sum is 4 + 6 + 7 = 17.
Correct Answer:
(C) 17.
Correct Answer: C) 17
स्मार्ट फोन का उपयोग IoT सेटअप में __________ एप्लिकेशन श्रेणियों के साथ किया जा सकता है।
Smart phones can be used in IoT setup with __________ application categories.
Smartphones can be used in IoT (Internet of Things) setups across multiple application categories, typically including:
- Home Automation: Smartphones can control devices like lights, thermostats, and security systems in a smart home.
- Health Monitoring: Smartphones can be used to monitor health data, such as heart rate or physical activity, via IoT-enabled devices.
- Smart Transportation: Smartphones can be used for navigation, tracking, and control of IoT-enabled vehicles and infrastructure.
- Industrial Automation: Smartphones can be used to monitor and control machinery, equipment, and processes in an industrial setting through IoT sensors.
Thus, smartphones can play a role in 4 key application categories in an IoT setup.
Correct Answer:
(C) 4.
Correct Answer: B) 3
निम्नलिखित Arduino कोड का परिणाम क्या है?
What is the outcome of the following Arduino code?
void setup() {
Serial.begin(9600);
}
void setup() {
Serial.write(20);
}
The Serial.write(20); function sends the value 20 as a byte through the serial communication pins. It does not send a string or a number in octal or hexadecimal format, just the raw byte with the decimal value of 20.
Correct Answer:
(C) Send a byte with value 20 through the Serial pins.
Correct Answer: C) Send a byte with value 20 through the Serial pins
MAC और IPV6 पतों की मानक लंबाई क्या है?
What is the standard length of MAC and IPV6 addresses?
The correct standard lengths for MAC and IPv6 addresses are:
- MAC address: It is 48 bits long, typically represented as 12 hexadecimal digits (6 bytes).
- IPv6 address: It is 128 bits long, represented in 8 groups of 4 hexadecimal digits.
Correct Answer:
(A) 48 and 128.
Correct Answer: A) 48 and 128
लूप के लिए दो वेरिएबल x और y को एक साथ कैसे चलाएं?
How to run two variables x and y in for loop simultaneously?
The correct way to run two variables x and y in a single for loop simultaneously involves having both variables initialized, updated, and checked together in the loop's structure.
Explanation:
-
Option (A) and Option (D) are incorrect because they represent two separate
forloops. Each loop runs independently, so they do not execute simultaneously in the same loop structure. -
Option (B) is the correct one. It initializes both
xandytogether, sets their conditions (x < mandy < m), and updates both variables in each iteration (x++andy+=3).
Correct Answer:
(B) for (x = 0, y = 0; x
Correct Answer: B) for (x = 0, y = 0; x<m, y<m; x++, y+=3)
फ़ंक्शन pgm_read_word ((&(var_data[x][y]))) फ्लैश मेमोरी से ______ पढ़ता है:
The function pgm_read_word ((&(var_data[x][y]))) reads ______ from flash memory:
The function pgm_read_word(&(var_data[x][y])) in Arduino is used to read data from the program (flash) memory, specifically words (16-bit values). In this context, a "word" typically refers to a 16-bit integer, since it is the most common size for a "word" in most microcontroller architectures.
Explanation:
- pgm_read_word() is used to retrieve a 16-bit value (or an integer) from flash memory. This function is often used in situations where data is stored in flash memory and you want to read a specific word from it.
Correct Answer:
(B) Integers.
Correct Answer: B) Integers
8085 में कितने झंडे हैं?
How many flags does 8085 have?
The Intel 8085 microprocessor has 5 flags. These flags are used to store the results of arithmetic and logical operations and are part of the status register. The five flags are:
- Sign flag (S): Indicates if the result is negative.
- Zero flag (Z): Indicates if the result is zero.
- Auxiliary Carry flag (AC): Used in BCD (binary-coded decimal) operations.
- Parity flag (P): Indicates whether the number of 1's in the result is even or odd (even parity or odd parity).
- Carry flag (CY): Indicates if there was a carry or borrow in arithmetic operations.
Correct Answer:
(B) 5.
Correct Answer: B) 5