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.





Think With Ink

Differ your Content by Color.




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.


Please wait...

Interview Questions and Answers :: Broadcom Ltd

Home > Experience Archives > Broadcom Ltd > Interview Question Set 2
Telephonic Round
    Question :: 1
    Briefly Introduce yourself.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 2
    Write a statement which will increment the pointer value to 10 on doing ptr++
    int arr[100];
    int *ptr;
    /* do something here*/
    ptr++; // This should incrememnt ptr value by 10 location.

    Answer:

    int main(){

    int x=3;

    int *ptr=&x;

    printf("%d\n", ptr);

    char *p = (char*)ptr;

    p+=10; //increments pointer by 10 bytes

    ptr = (int *)p;

    printf("%d\n",ptr);

    }

    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 3
    What is Structure padding. What is use of it. How to resolve without actual pragma directive

    Answer:

    http://www.firmcodes.com/structure-padding-and-packing-in-c-example/

    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 4
    What is volatile const?

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 5
    char *ptr = \"hello word\"";

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 6
    What does below do?
    int *ptr = (int *)malloc (0);

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 7
    Write program to toggle given range of bits in unsigned 32bit integer

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 8
    Write program to update 0xCD to given unsigned 32bit integer like 0xABABABAB to 0xABABCDAB

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 9
    What is function pointers and write prototype of a function which takes 2 pointer integers and return a pointer integer

    Answer:
    int * (*fun)(int *,int *)
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 10
    In singly linked list, how to get last but 3 rd element. write program

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 11
    Declare 1 bit variable and print it.

    Answer:
    typedef struct size_t
    {
        unsigned x:1;
    } size_1;
    Where you have told the compiler that you'll only be using one bit of x.

    But due to structure packing arrangements (the C standard is intentionally flexible in order that compilers can optimize according to the machine architecture), it may well turn out that this still occupies as much space in memory as a regular unsigned and an array of  size_1 doesn't have to be bitwise contiguous.

    Generally, the smallest addressable chunk of data in C is a byte. You can not have a pointer to a bit, so you can not declare a variable of 1 bit size, But above can be one way to have 1 bit size.
    Please Login First :
    Tags:

    No Tags on this question yet!