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 1
Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F)
    Question :: 1
    Briefly introduce your self, and current project you are working.

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

    No Tags on this question yet!

    Question :: 2
    How to check a number, whether it is power of 2 or not.

    Answer:
    bool IsPowerOfTwo(ulong x)
    {
    return (x != 0) && ((x & (x - 1)) == 0);
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 3
    How to delete a node in linklist, when one address of that node is given.

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

    No Tags on this question yet!

    Question :: 4
    How to find the nth node in linklist from back.

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

    No Tags on this question yet!

    Question :: 5
    What is volatile.

    Answer:

    Things which are all changeable is volatile.

    for example, int a=5;

    a=a+1; //value changes,this is volatile.

    by default all variables are volatile.

    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 6
    What is mutex and semaphore, what is difference in both, is binary

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

    No Tags on this question yet!

    Question :: 7
    what is virtual memory.

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

    No Tags on this question yet!

    Question :: 8
    Some questions from paging, what is it, how to get address.

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

    No Tags on this question yet!

    Question :: 9
    How to implement sizeof operator.

    Answer:
    #define my_sizeof(type) (char *)(&type+1)-(char*)(&type)
    int main()
    {
        double x;
        printf("%d", my_sizeof(x));
        getchar();
        return 0;
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 10
    Some basic networking question

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

    No Tags on this question yet!

    Question :: 11
    What is basic difference in hub,switch and bridge etc.

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

    No Tags on this question yet!

    Question :: 12
    Some questions from project specific.

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

    No Tags on this question yet!

Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F) Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F) Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F)
    Question :: 1
    Draw the architecture, in which you are working, i.e pkt flow in it. then there were multiple question in it.

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

    No Tags on this question yet!

    Question :: 2
    What are the defect I have worked on.

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

    No Tags on this question yet!

    Question :: 3
    Some question from Broadcom, (Explain step by step)
    1. pkt flow,
    2. L2 learning,
    3. port status, and
    4. How to check counter at ports

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

    No Tags on this question yet!

    Question :: 4
    Write a program to print the positions of bit set in a given number.

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

    No Tags on this question yet!

    Question :: 5
    How to define a node of linklist,

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

    No Tags on this question yet!

    Question :: 6
    Write a program to delete a node in linklist, i.e node might be in last/first/middle.

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

    No Tags on this question yet!

    Question :: 7
    Write a proram to reverse the linklist.

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

    No Tags on this question yet!

    Question :: 8
    Write a program to print the Linklist element in reverse order by recursion.

    Answer:
    void recLinkedList(struct node *head)
    {
    struct node *tmp = head->next;

    if ( tmp != NULL)
    recLinkedList(tmp);

    printf("\r\n [%d] \r\n", tmp->data);

    }
    Please Login First :
    Tags:

    No Tags on this question yet!

Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F)
    Question :: 1
    You have 10 bags full of coins, in each bag are 1,000 coins.But one bag is full of forgeries, and you can't remember which one.But you do know that a genuine coins weigh 1 gram, but forgeries weigh 1.1 grams.To hide the fact that you can't remember which bag contains forgeries, you plan to go just once to the central weighing machine to get ONE ACCURATE weight.How can you identify the bag with the forgeries with just one weighing?

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

    No Tags on this question yet!

    Question :: 2
    A bag contains five balls numbered 1,2,3,4,5. Another bag contains six balls numbered 1,2,3,4,5,6. One ball is drawn at random from each ball. Find the probability that (i) both balls have the same number.(ii) the sum of the numbers on the balls is 9

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

    No Tags on this question yet!

    Question :: 3
    Write a program to insert a node in a single linklist, (node insertion in head/middle/last)

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

    No Tags on this question yet!

    Question :: 4
    He draw a pic, having 5 routers,given at all router ospf is configured, or if you needed you configured static route also, how you ping from R1 router to R5 router.
    R1 ------ R2 ----- R3 -----R5
    | ---------R4------- |

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

    No Tags on this question yet!

    Question :: 5
    There were multiple question, like which path will be chooses. routing table information, how router will know about its next hop. etc.

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

    No Tags on this question yet!

    Question :: 6
    what is virtual memory.

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

    No Tags on this question yet!

    Question :: 7
    What is the basic C structure.

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

    No Tags on this question yet!

    Question :: 8
    Memory layout in c.

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

    No Tags on this question yet!

    Question :: 9
    Can you write a program to show stack is growing.

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

    No Tags on this question yet!

    Question :: 10
    Write a program a mirror copy of a BST.

    Answer:
    void mirror(struct Node* node)
    {
      if (node==NULL)
        return
      else
      {
        struct Node* temp;
         
        /* do the subtrees */
        mirror(node->left);
        mirror(node->right);
     
        /* swap the pointers in this node */
        temp        = node->left;
        node->left  = node->right;
        node->right = temp;
      }
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 11
    what is signal, Which signal can't be handle.

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

    No Tags on this question yet!

    Question :: 12
    How you detect dedlock, If you found, how you prevent it.

    Answer:

    Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.

    deadlock









    Deadlock can arise if following four conditions hold simultaneously (Necessary Conditions) 
    Mutual Exclusion: One or more than one resources are non-sharable (Only one process can use at a time)
    Hold and Wait: A process is holding at least one resource and waiting for resources.
    No Preemption: A resource cannot be taken from a process unless the process releases the resource.
    Circular Wait: A set of processes are waiting for each other in circular form.



    Methods for handling deadlock
    There are three ways to handle deadlock
    1) Deadlock prevention or avoidance: The idea is to not let the system into the deadlock state.


    2) Deadlock detection and recovery: Let deadlock occur, then do preemption to handle it once occurred.

    3) Ignore the problem altogether: If the deadlock is very rare, then let it happen and reboot the system. This is the approach that both Windows and UNIX take.


    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 13
    What is fragmentation, what is internal/external fragmentation.

    Answer:

    https://techdifferences.com/difference-between-internal-and-external-fragmentation.html

    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 14
    What are the scheduling do you know.

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

    No Tags on this question yet!

    Question :: 15
    process v/s thead, tell me the scenario where you have used thread instead of process.

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

    No Tags on this question yet!

    Question :: 16
    How you will used in thread.

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

    No Tags on this question yet!

    Question :: 17
    Do you know brk() and sbrk,

    Answer:
    brk is used to set the end of the data segment to the value you specify. It says "set the end of my data segment to this address". Of course, the address you specify must be reasonable, the operating system must have enough memory, and you can't make it point to somewhere that would otherwise exceed the process maximum data size. Thus, brk(0) is invalid, since you'd be trying to set the end of the data segment to address 0, which is nonsense.
    On the other hand, sbrk increments the data segment size by the amount you specify, and returns a pointer to the previous break value. Calling sbrk with 0 is valid; it is a way to get a pointer to the current data segment break address.
    malloc is not a system call, it's a C library function that manages memory using sbrk. According to the manpage, malloc(0) is valid, but not of much use:
    If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free().
    So, no, brk(0)sbrk(0) and malloc(0) are not equivalent: the first of them is invalid, the second is used to obtain the address of the program's break, and the latter is useless.
    Keep in mind that you should never use both malloc and brk or sbrk throughout your program. mallocassumes it's got full control of brk and sbrk, if you interchange calls to malloc and brk, very weird things can happen.

    On success, brk() returns zero, and sbrk() returns a pointer to the start of the new area. On error, -1 is returned, and errno is set to ENOMEM.


    Please Login First :
    Tags:

    No Tags on this question yet!

Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Fourth Round (F-2-F) Sixth Round (F-2-F)