Embedded System
  • # Can structures be passed to the functions by value?
  • # Why cannot arrays be passed by values to functions?
  • # Advantages and disadvantages of using macro and inline functions?
  • #
  • # What happens when recursion functions are declared inline?

Since the number of recursions is unknown until run time, the compiler cannot generate the inline code at compile time. Most compilers inline only the first call, if any. Avoid inlining recursive functions and watch out for infinite recursion (where a function calls itself forever, analogous to infinite loops with constructs).

  • # Scope of static variables?
  • # Difference between object oriented and object based languages?
  • # Multiple inheritance - objects contain howmany multiply inherited ancestor?
  • # What are the 4 different types of inheritance relationship?
  • # How would you find out the no of instance of a class?
  • # Is java a pure object oriented language? Why?
  • # Order of constructor and destructor call in case of multiple inheritance?
  • # Can u have inline virtual functions in a class?
  • # When you inherit a class using private keyword which members of base class are visible to the derived class?
  • What is the output of printf("\nab\bcd\ref"); -> efd

new line and then will print ‘efd’
Now why is that:
‘\n’ will do a new line
then print ‘ab’
then ‘\b’ will delete the ‘b’ in ‘ab’ so we left with ‘a’
then will print ‘cd’ so now we have ‘\nacd’
‘\r’ is carriage return, which will go back to the start of the line
So now the cursor is on the ‘a’ letter in the start of the line.
Now we print ‘ef’ but and its GREAT BUT, the ‘ef’ letters start to write in the start of the line, so ‘ef’ is written on ‘ac’, but we had ‘acd’ written, so now we have ‘efd’.
Now you understand why the ‘\n’ in the start, its there to make sure the ‘a’ will print in the start of the line, else the output will not be predictable.

  • # #define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
  • Can you have constant volatile variable? Yes, you can have a volatile pointer?
  • # ++*ip increments what? it increments what ip points to
  • # Operations involving unsigned and signed — unsigned will be converted to signed
  • # a+++b -> (a++)+b
  • # malloc(sizeof(0)) will return — valid pointer
  • # main() {fork();fork();fork();printf("hello world"); } — will print 8 times.
  • # Array of pts to functions — void (*fptr[10])()
  • # Which way of writing infinite loops is more efficient than others? there are 3ways.
  • # # error — what it does?

#error is used for displaying an error while compilation. for eg.

#ifdef ABC
#ifdef DEF
#error “Declaration not done”
  • # How is function itoa() written?
  • Who to know wether systemuses big endian or little endian format and how to convert among them?
A. main()
int a=0×1;
if(*(char *)&a == 1)
printf(”little endian”);
printf(”big endian”);
  • # What is interrupt latency?
  • # What is forward reference w.r.t. pointers in c?
  • # How is generic list manipulation function written which accepts elements of any kind?
  • # What is the difference between hard real-time and soft real-time OS?

Hard RTOS is system which will be having major problems if the specified time limit is crossed. For eg. missiles
Soft RTOS is systems which will not be having major problems if the specified limit is crossed. For eg. real time audio steaming.
But for both exceeding the time limit is concidered as error.

  • # What is interrupt latency? How can you recuce it?
  • # What is the differnce between embedded systems and the system in which rtos is running?
  • # How can you define a structure with bit field members?
  • # What are the features different in pSOS and vxWorks?
  • # 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?
  • # What are the different storage classes in C?


  • What are the different qualifiers in C?


  • What are the different BSD and SVR4 communication mechanisms
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License