Embedded-Interview-Questions
Embedded-Interview-Questions
com/members/abeer_habeeb/answers/1316084160-Interview-
questions.pdf
Question
Rating
View Answer
a+++b -> (a++)+b
View Answer
What is forward reference w.r.t. pointers in c?
View Answer
Can you have constant volatile variable?
View Answer
What are the different storage classes in C?
View Answer
What are the 4 different types of inheritance relationship?
View Answer
What are the features different in pSOS and vxWorks?
View Answer
#define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
View Answer
What are the different qualifiers in C?
View Answer
malloc(sizeof(0)) will return ? valid pointer
View Answer
Multiple inheritance - objects contain howmany multiply inherited ancestor?
View Answer
Difference between object oriented and object based languages?
View Answer
What will this return malloc(sizeof(-10))
View Answer
++*ip increments what? it increments what ip points to
View Answer
Advantages and disadvantages of using macro and inline functions?
View Answer
What are the different BSD and SVR4 communication mechanisms
View Answer
How is generic list manipulation function written which accepts elements of any kind?
View Answer
Which way of writing infinite loops is more efficient than others?
View Answer
Why cannot arrays be passed by values to functions?
View Answer
How is function itoa() written?
View Answer
Can structures be passed to the functions by value?
View Answer
Question
Rating
View Answer
How do you write a function which takes 2 arguments - a byte and a field in the byte and returns the value of the field
in that byte?
View Answer
How would you find out the no of instance of a class?
View Answer
What is interrupt latency? How can you recduce it?
View Answer
Order of constructor and destructor call in case of multiple inheritance?
View Answer
How can you define a structure with bit field members?
View Answer
Operations involving unsigned and signed ? unsigned will be converted to signed
View Answer
Who to know whether system uses big endian or little endian format and how to convert among them?
View Answer
What is the difference between hard real-time and soft real-time OS?
View Answer
How many nuclear plants are there in India and what are they? which place they are located?
View Answer
What is the output of printf(" abcd ef"); -> ef
View Answer
What is the differnce between embedded systems and the system in which rtos is running?
View Answer
What happens when recursion functions are declared inline?
View Answer
Can u have inline virtual functions in a class?
View Answer
When you inherit a class using private keyword which members of base class are visible to the derived class?
View Answer
Is java a pure object oriented language? Why?
View Answer
What are set up time & hold time constraints? What do they signify? Which one is critical for estimating maximum clock
frequency of a circuit?
View Answer
Explain Order of constructor and destructor call in case of multiple inheritance?
View Answer
Explain What are the different qualifiers in C?
View Answer
Explain What is forward reference w.r.t. pointers in c?
View Answer
How is function itoa() written in C?
View Answer
Question
Rating
View Answer
View Answer
View Answer
Explain Operations involving unsigned and signed? unsigned will be converted to signed?
View Answer
View Answer
View Answer
View Answer
View Answer
Explain What is the difference between embedded systems and the system in which RTOS is running?
View Answer
View Answer
View Answer
View Answer
View Answer
View Answer
Explain Operations involving unsigned and signed? unsigned will be converted to signed?
View Answer
Explain Order of constructor and destructor call in case of multiple inheritance?
View Answer
Explain What are the features different in pSOS and vxWorks?
View Answer
Explain Difference between object oriented and object based languages?
View Answer
What are the advantages and disadvantages of using macro and inline functions?
View Answer
Explain Why cannot arrays be passed by values to functions?
View Answer
Question
Rating
View Answer
Explain what is interrupt latency? How can we reduce it?
View Answer
Explain What are the different qualifiers in C?
View Answer
Explain What are different qualifiers in C?
View Answer
Explain What are the 5 different types of inheritance relationship?
View Answer
Explain What will this return malloc(sizeof(-10))?
View Answer
Explain Can structures be passed to the functions by value?
View Answer
Explain Can we have constant volatile variable?
View Answer
Explain Can we have constant volatile variable?
View Answer
Explain What are the different storage classes in C?
View Answer
How is function itoa() written in C?
View Answer
Explain What is the difference between embedded systems and the system in which RTOS is running?
View Answer
How to define a structure with bit field members?
View Answer
Explain What is interrupt latency?
View Answer
Explain Scope of static variables?
View Answer
Explain What are the features different in pSOS and vxWorks?
View Answer
Explain Difference between object oriented and object based languages?
View Answer
Explain Why cannot arrays be passed by values to functions?
View Answer
Explain What are different qualifiers in C?
View Answer
Explain What are the 5 different types of inheritance relationship?
View Answer
Explain What are the 5 different types of inheritance relationship?
View Answer
Question
Rating
View Answer
Explain What will this return malloc(sizeof(-10))?
View Answer
Explain Can structures be passed to the functions by value?
View Answer
Explain Can we have constant volatile variable?
View Answer
Explain What are the different storage classes in C?
View Answer
Explain What is forward reference w.r.t. pointers in c?
View Answer
how to improve performance of processor in embedded system design
View Answer
Question :
a+++b -> (a++)+b
Category Embedded Systems Interview Questions
Rating (0.4) By 1458 users
Added on 7/6/2005
Views 3074
Rate it!
Answers:
Contact g.durga
Contact jeyaraj
c=(a++)+b;
printf(" the result of (a++)+b is %d ",c);
Contact krishna
Contact nag
Contact chandra
c=a+++b; //here a++ is post increment where as ++b is pre but ++b has to be incremented
after incrementing a, where in single statement it is not possible.
printf(" the result of a+++b is %d ",c);
c=(a++)+b;
printf(" the result of (a++)+b is %d ",c);
priority of ++ is higher than +. also ++ has R-L associativity & +,() has L-R associativity.
hence both the answers will be different
Posted by: chethan
Contact chethan
{
int a = 10,b = 30,c;
//c=a+++b;
//d=(a++)+b;
}
Contact pramod d
Contact ashok
int a = 5, b = 7, c;
c = a+++b;
This question is intended to be a lighthearted end to the quiz, as, believe it or not, this is
perfectly legal syntax. The question is how does the compiler treat it? Those poor compiler
writers actually debated this issue, and came up with the "maximum munch" rule, which
stipulates that the compiler should bite off as big (and legal) a chunk as it can. Hence, this
code
is treated as:
c = a++ + b;
Thus, after this code is executed, a = 6, b = 7, and c = 12.
If you knew the answer, or guessed correctly, well done. If you didn't know the answer then I
wouldn't consider this to be a problem. I find the greatest benefit of this question is that it is
good for stimulating questions on coding styles, the value of code reviews, and the benefits of
using lint.
Contact divya
#include<stdio.h>
#include<conio.h>
void main()
{
int a=10,b=20;
clrscr();
printf("a+++b=%d ",a+++b);
printf("(a++)+b=%d",(a++)+b);
getch();
}
o/p:
a+++b=30
(a++)+b=31
Contact md asif
when u'll print both values at same time, a value 'll be incremented and u'll different answers.
Views 3186
Rate it!
Answers:
int a=10;
int *p=&a;
*p is called forward Reference.........
Posted by: manik
Contact manik
Pointer use's to reference to value a into int a=10 to memory add this value and 10 is add p
value added this data in memory location for p............for reference key is a
Contact pankaj
Question :
Can you have constant volatile variable?
Category Embedded Systems Interview Questions
Rating (0.4) By 1097 users
Added on 7/6/2005
Views 3615
Rate it!
Answers:
In this current context of code will not change the value of the variable but out side of the
program i.e. hardware registers can change it.
Contact rajkumar
precisely volatile variable warns the compiler that the value of the variable may change at any
time without the knowledge of the compiler, to the code currently executed.
volatile int * const port_add = 0x400;
Posted by: Murali Prasath
Volatile type tell the compiler , this variable can be changed by any external tasks, So do not
optimize while compiling and linking final executable.
Here is Example:
func()
{
TIME* time;
time = GetSystime();
In the above function , time is a structure which gets the time before and after FOR loop.
At these two instances time is definitely different, because of FOR loop. If you go for an
embedded system compiler, generally it optimizes the "time = GetSystime();" expression.
because it thought that, code is redundant no need to load the getsystime value again from
memory , if u dont use VOLATILE. to avoid this kind of things use Volatile.
Contact Jay
Const and volatile keywords should not be used together because both are opposite in nature.
A variable is declared as "const" means it's value is not able to be changed but if it is declared
as "Volatile" then it is not under control.
Contact PadmavathB