1. Explain Scope of static variables?

Static variables can only be accesed in the files were they are declared.

Static variable within the scope of a function store it's values in consecutive calls of that function.

Static functions can only be caled within the file they are defined.

2. Explain What is interrupt latency?

Interrupt latency refers to the amount of time between when an interrupt is triggered and when the interrupt is seen by software.

3. How to define a structure with bit field members?

You can define structure bit field members with Dot operators.

EXAMPLE:

#include <stdio.h>
int main()
{

Struct bit_field
{
Int x.4; // it allocates only 4 bits to x
Char C.6; // it allocates only 6 bits to C;
};

return 0;
}

4. Explain What is the difference between embedded systems and the system in which RTOS is running?

Embedded system can include RTOS and cannot include also. it depends on the requirement. if the system needs to serve only event sequencially, there is no need of RTOS. If the system demands the parallel execution of events then we need RTOS.

5. How is function itoa() written in C?

#include<stdlib.h>
#include<stdio.h>
int main()
{
int n = 6789;
char p[20];
itoa(n,s,10);
printf("n=%d,s=%s",n,s);
return 0;
}

6. Explain What is forward reference w.r.t. pointers in c?

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

7. Explain What are the different storage classes in C?

Four types of storage classes are there in c.
1.Auto
2.Register
3.Static
4.Extern or Global

8. Explain Can we have constant volatile variable?

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.

9. Explain Can structures be passed to the functions by value?

Yes structures can be passed to functions by value. Though passing by value has two disadvantages :

1) The charges by the calling function are not reflected
2) Its slower than the pass by reference function call.

10. Explain What will this return malloc(sizeof(-10))?

It will return a 4 byte address value.
Because -10 is a signed integer(varies from compiler to compiler).