Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

Interview Questions and Answers :: Ericsson

Home > Experience Archives > Ericsson > Interview Question Set 2
First Round (F-2-F) Second Round (F-2-F)
Question :: 1
Introduce Yourself briefly.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 2
How comfortable are you in C?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 3
How to know if a system is little endian or big endian?

#include
int main()
{
int tmp=1;
if(*(char*)&tmp == 1)
printf("\n system is little endian \n");
else
printf("\n sytem is big endian \n");
return 0;
}
Tags:

No Tags on this question yet!

Question :: 4
Can you write a program to convert big-endian to little-endian?

#define htons(A) ((((unit16_t)(A) & 0xff00) >> 8) | (((unit16_t)(A) & 0xff00) << 8))

#define htonl(A) ((((unit32_t)(A) & 0xff000000) >> 24) | (((unit32_t)(A) & 0x00ff0000) >> 8) | (((unit32_t)(A) & 0x0000ff00) << 8) | (((unit32_t)(A) & 0x000000ff) << 24))

---------- or
convertBigtoLittle (int num)
{
int b0,b1,b2,b3;
b0 = (num & 0x000000ff) >> 0;
b1 = (num & 0x0000ff00) >> 8;
b2 = (num & 0x00ff0000) >> 16;
b3 = (num & 0xff000000) >> 24;

return ((b0 << 24) | (b1 << 16) | (b2 << 8) | (b3 << 0))

}
Tags:

No Tags on this question yet!

Question :: 5
What are different storage classes in C?

storage class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. We have four different storage classes in a C program:

# auto
# register
# static
# extern
Tags:

No Tags on this question yet!

Question :: 6
What is the default scope of a function?

functions have either global scope or file scope. Global scope applies to a normal function that's visible throughout the entire program.
File scope applies to a function you've marked as "static", so it's only visible within the same translation unit.
Tags:

No Tags on this question yet!

Question :: 7
What is the role of a static variable?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 8
Why volatile keyword is used?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 9
When you do malloc() you need to pass the number of bytes that you require. But when you call free() you only pass the pointer. So, how the free() call detects how many bytes to free?

When memory allocation is done, the actual heap space allocated is one word larger than the requested memory. The extra word is used to store the size of the allocation and is later used by free( )
Tags:

No Tags on this question yet!

Question :: 10
What is structure padding and why is it used?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

First Round (F-2-F) Second Round (F-2-F)
Question :: 1
Introduce Yourself briefly.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 2
Explain PCI bus.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 3
How PCI enumeration is done?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 4
Do we need a stack to work with?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 5
How the stack works?

No Discussion on this question yet!
Tags:

No Tags on this question yet!

Question :: 6
Tell me what are the following declarations
void (*func) (int)
int *(*func)[10] (int)
int *(*func[10]) (int *)