6/4/2015 Interview Questions | Embedded System Basics
Embedded System Basics
Just another Blog for Embedded System
Overview of Microcontroller – 8051
26 02 2010
In this post i have given only links. i found those links to be more
informative.
Wiki page ([Link]
[Link] ([Link]
8051_tutorial
([Link]
In next upcoming post we can see some examples program for 89c51 in
Keil software ([Link]
Comments : Leave a Comment »
Categories : Embedded System, Interview Questions
Overview of Microprocessor – 8085
(useful links)
11 01 2010
In this post i have given only links. i found those links to be more
informative.
Wikipedia Link ([Link]
Good Link for all processor details Link for all processor main menu
([Link]
[Link] 1/7
6/4/2015 Interview Questions | Embedded System Basics
Document in under this link explains the basic of the 8085
microprocessor ([Link]
Microprocessor).
8085 questions & answer Links
1. Wiki Answers ([Link]
2. Interview Questions ([Link]
micr0processor‑questions)
I have not gone through all the questions, but if you have any doubts or
information to share please comment it, we can discuss it.
back to Topics to be discussed
([Link]
discussed/)
Comments : Leave a Comment »
Tags: 8085, Microprocessor
Categories : Embedded System, Interview Questions
Answers for Basic ‘C’ interview
questions part 1
5 01 2010
question can be found in this link
([Link]
questions)
1, what is qualifiers?
Qualifiers defines the property of the variable. Two qualifiers are
const and volatile. The const type qualifier declares an object to be
nonmodifiable. The volatile type qualifier declares an item whose
value can legitimately be changed by something beyond the control
of the program in which it appears, such as a concurrently executing
thread / interrupt routine.
2, What is storage class? explain with example
The storage class determines the part of memory where storage is
[Link] 2/7
6/4/2015 Interview Questions | Embedded System Basics
The storage class determines the part of memory where storage is
allocated for an object (particularly variables and functions) and
how long the storage allocation continues to exist. In C program,
there are four storage classes: automatic, register, external and static.
Auto
They are declared at the start of a program’s block such as in the
curly braces ( { } ). Memory is allocated automatically upon
entry to a block and freed automatically upon exit from the
block.
The scope of automatic variables is local to the block in which
they are declared, including any blocks nested within that block.
For these reasons, they are also called local variables.
Automatic variables may be specified upon declaration to be of
storage class auto. However, it is not required to use the
keyword auto because by default, storage class within a block is
auto.
Register
Automatic variables are allocated in the main memory of the
processor; accessing these memory location for computation will
take long time.
when we required to optimize the execution time, move the
critical variable to processor register. this can be done by using
the register key word.
when storage class is register, compiler is instructed to allocate a
register for this variable.
scope of the register variable is same as auto variable.
NOTE: Allocation of register is not guaranteed always, it depends
on number register available in processor and number register used
for manipulation. if you define 4 variable as register storage class
and and processor has only 2 register for variable allocation, then
compiler will allocate 2 variable in registers and treat the remaining
2 variable as auto variable. therefore usage of register keyword
should should be justified and cross checked with
disassembly weather register is allocated or not.
Extern
For using the external global variable from other files extern
keyword is used.
any file can access this global variable and lifetime over entire
program run.
[Link] 3/7
6/4/2015 Interview Questions | Embedded System Basics
Static
static variable have lifetime over entire program run.
scope of this variable is limited based on the place of declaration.
if static variable is defined in a file and not inside any function,
then scope of the variable is limited within that file.
if static variable is defined inside a function, then the scope of the
variable is limited within that function.
we can use this variable any file and any function indirectly by
accessing through pointer.
3, Explain about preprocessor?
The C preprocessor is the preprocessor for the C programming
language. In many C implementations, it is a separate program invoked
by the compiler as the first part of translation. The preprocessor handles
directives for source file inclusion (#include), macro definitions
(#define), conditional inclusion (#if), user defined compilation error
and warning(#error) and compiler specific preprocessor(#pragma).
see more in wiki link ([Link]
4, Write a macro with two argument A, B. where A is byte and B
specifies a bit position of the byte. macro should clear the particular bit
position in the given byte?
see comments section in previous post
([Link]
questions/#comments)
5, Write prototype for a function pointer and array of function pointers?
see comments section in previous post
([Link]
questions/#comments)
6, Explain the following definition?
char c;
char *pc;
const char *pcc;
char const *pcc2;
char * const cpc;
const char * const cpcc;
see comments section in previous post
([Link]
questions/#comments)
[Link] 4/7
6/4/2015 Interview Questions | Embedded System Basics
7, What is dangling pointers?
see comments section in previous post
([Link]
questions/#comments)
see wiki link ([Link]
8, What is wild pointers?
Wild pointers are created by omitting necessary initialization prior to
first use. Thus, strictly speaking, every pointer in programming
languages which do not enforce initialization begins as a wild pointer.
This most often occurs due to jumping over the initialization, not by
omitting it. Most compilers are able to warn about this.
int* a;
/* a is wild pointer, it is not initialized and it may have some garbage
value*/
correct way is
int* a = NULL;
9, Explain different memory section in processor?
See post related to memory segment
([Link]
10, Explain dynamic allocation memory?
see comments section in previous post
([Link]
questions/#comments)
11, In which memory section dynamically allocated memory is located?
see comments section in previous post
([Link]
questions/#comments)
[Link] 5/7
6/4/2015 Interview Questions | Embedded System Basics
12, what are possible problem in dynamic memory allocation?
see comments section in previous post
([Link]
questions/#comments)
Comments : 1 Comment »
Categories : ʹCʹ, Interview Questions
Basic ‘C’ interview questions
22 12 2009
what is qualifiers?
What is storage class? explain with example
Explain about preprocessor?
Write a macro with two argument A, B. where A is byte and B specifies
a bit position of the byte. macro should clear the particular bit position
in the given byte?
Write prototype for a function pointer and array of function pointers?
Explain the following definition?
char c;
char *pc;
const char *pcc;
char const *pcc2;
char * const cpc;
const char * const cpcc;
What is dangling pointers?
What is wild pointers?
Explain different memory section in processor?
Explain dynamic allocation memory?
In which memory section dynamically allocated memory is located?
[Link] 6/7
6/4/2015 Interview Questions | Embedded System Basics
what are possible problem in dynamic memory allocation?
i will give the answer for this questions later. I request you to give the
answers, so that we can discuss answers here.
Answers can be found in this link
([Link]
c‑interview‑questions‑part‑1/)
Comments : 12 Comments »
Categories : ʹCʹ, Interview Questions
Blog at [Link]. The Freshy Theme.
Follow
Follow “Embedded System Basics”
Build a website with [Link]
[Link] 7/7