The following questions are ARi embedded c interview questions on C, Embedded, I2C, RTOS, UART, RS232, RS485
1) What is the
output of the following C Program?
#include<stdio.h>
int main()
{
char ch = 256;
printf("%d",ch);
return 0;
}
Answer : 0
2) What is the output of the following C Program?
#include<stdio.h>
int main()
{
int a[3][3] =
{{1,2,3},{4,5,6},{7,8,9}};
printf("%d",*(*(a+2)));
return 0;
}
Answer : 7
3) What will happen when the program is compiled?
#include<stdio.h>
#include<conio.h>
int main()
{
int a[5];
int b = a[6];
printf("%d",b);
getch();
return 0;
}
Answer: Program will compile successfully b is junk value
4) Difference between Structure and Union ?
5) How will you define Enum? and explain about it?
6) What is the output of the following program?
#include<stdio.h>
#include<conio.h>
int main()
{
extern int a;
printf("%d",a);
getch();
return 0;
}
Answer: Program will not compile it will throw the undefined reference to `a' error.
7) Explain about Dynamic Memory Allocation?
9) Explain about static variable ?
10) What is the Compilation process ?
11) What is the difference between RS232 and Rs485
13) Explain about I2C Arbitration ?
14) Explain about I2C Clock stretching?
15) Difference between NAND Flash and NOR Flash ? ( Which one is
fast and more )
16) How do you vary the duty cycle of the PWM ?
17) Can we change the PWM duty cycle in runtime ?
18) Do you know about CAN ?
19) Did you use multi master I2C in your project ?
20) Why RS485 is less noise ?
21) Why Pullup resistors are needed in I2C lines SCL and SCK
?
22) How do you prioritize tasks in RTOS in you project ?
Post your doubts in the comment section
No comments:
Post a comment