What will be the output of the following code?
int main() { int i=25; int k=i%4; print("%d\n",k); }
1
2
3
4
Pin No. 3
Pin No. 2
Pin No. 5
Pin No. 4
Prototyping
Casting
Protocasting
Protocal Typing
int sensorPin=9
int sensorValue=9
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
void main() { int x = 5*6/2 +8; printf("%d",x); return 0; }
20
21
23
19
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… }
0xAB
0xa
0
Error
int main() { int a=5; while(a=123) { printf("RABBIT\n"); } printf("GREEN"); return 0; }
RABBIT is printed unlimited number of times
RABBIT GREEN
Compiler error
GREEN
What is the output of “pin 1” if “pin2” is sent “1011” where 1 is 5V and 0 is 0V?
int pin1 = 12; int pin2 = 11; void setup() { pinMode(pin1, OUTPUT); pinMode(pin2, INPUT); Serial.begin(9600); } void loop() { if(digitalRead(pin2)==1) { digitalWrite(pin1,LOW); } else if(digitalRead(pin2)==0) { digitalWrite(pin1,HIGH); } }
1110
0100
1111
1011
What will be the output of the following piece of code?
#include <stdio.h> int main() { int i; for(i=0;i< 8; i++); printf("%d",i); return 0; }
1234567
8
Infinite loop
50
25
27
54
Encoding
Decoding
Calculation
Processing
int k={3,4}
int k=new int[2]
int k [2] = {3,4};
int k(2)={3,4};
Logic (1/0) not used for input/output.
Used for the digital conversion of analog values taken from external environment.
There are 6 analog input pins.
The resolution of each input is 10 bits.
What is the output of C program with functions?
int main() { int a = 0; printf("AJAY"); return 1; printf("VIJAY"); return 1; }
AJAY VIJAY
AJAY
VIJAY
Compiler Error
A2
D2
PWM
5V
Value
Size
Address
None of the above
5-10 Sec
5-10 MS
10-15 MS
10-20 MS
General-Purpose Input/Output
General-Purpose Inner/Outer
Both (A) & (B)
Each request-response pair is dependent of others
Request- response is a stateless communication model
Client server architecture of Request-response uses queues
In request-response publisher is a client and broker are server.