[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Broadcom Ltd Interview Questions and Answers for 5 years Experience

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)

    1 / 12

    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!

    2 / 12

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

    Answer:
    #include

    int main()
    {
    int x;
    scanf("%d",&x);
    if((x)&&!(x&(x-1)))
    {
    printf(" %d is power of 2\n",x);
    }
    else
    {
    printf(" %d not power of 2 \n",x);
    }
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    3 / 12

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

    Answer:
    void deleteNodeWithoutHead(struct Node* pos)
    {
    if (*pos == NULL) // If linked list is empty
    return;

    else {
    struct Node* temp = pos->next;

    // Copy data of the next node to current node
    pos->data = pos->next->data;

    // Perform conventional deletion
    pos->next = pos->next->next;

    free(temp);
    }
    return 0;
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    4 / 12

    How to find the nth node in linklist from back.

    Answer:
    Use 2 pointers:-

    pNthNode
    pTemp

    Both the nodes point to the HEAD of the list. pNthNode starts moving only after pTemp has moved n nodes forward. From there, both nodes move forward until pTemp reaches NULL.
    pNthNode now points at the nth node from the end.



    /*
    Defining a function to find the nth node from the end.
    */
    struct node * nthNodeFromEnd(struct node * head, int n)
    {
    // we need to find the nth node from the end.
    struct node * pTemp = head;
    struct node * pNthNode = head;

    int nCurrentElement = 0;

    int counter = 0;

    while(counter != n)
    {
    pTemp = pTemp -> next;
    counter++;
    }

    while(pTemp != NULL)
    {
    pNthNode = pNthNode -> next;
    pTemp = pTemp -> next;
    }

    return pNthNode;
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    5 / 12

    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!

    6 / 12

    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!

    7 / 12

    what is virtual memory.

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

    No Tags on this question yet!

    8 / 12

    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!

    9 / 12

    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!

    10 / 12

    Some basic networking question

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

    No Tags on this question yet!

    11 / 12

    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!

    12 / 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)

    1 / 8

    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!

    2 / 8

    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!

    3 / 8

    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!

    4 / 8

    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!

    5 / 8

    How to define a node of linklist,

    Answer:
    typedef struct node{
    int data;
    struct node* next;
    }node;
    self referential structure
    Please Login First :
    Tags:

    No Tags on this question yet!

    6 / 8

    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!

    7 / 8

    Write a proram to reverse the linklist.

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

    No Tags on this question yet!

    8 / 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)

    1 / 17

    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:
    If there is only 1 bag with forgeries, then take 1 coin from the first bag, 2 coins from the second bag . . . 10 coins from the tenth bag and simply weigh the picked coins together !

    If there were no forgeries, you know that the total weight should be (1+2+3+ . . . +10) = 55 grams.

    But if, for example, the weight is 55.3 grams, then you know that 3 coins are forgeries, so that must be bag 3. So, that solves it.
    Please Login First :
    Tags:

    No Tags on this question yet!

    2 / 17

    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:
    Make a table.
    Bag 1 Bag 2 Sum
    1 1 2
    1 2 3
    1 3 4
    1 4 5
    1 5 6
    .
    .
    .
    5 1 6
    5 2 7

    5 3 8
    5 4 9
    5 5 10
    5 6 11
    i) Then count the total number of outcomes.
    There are 30 in all (5x6).
    Then count the times that the ball from Bag 1 is the same as Bag 2.
    There are 5 of those (1-1,2-2,3-3,4-4,5-5).
    So the probability of two balls identical is
    P=5/30=1/6
    ii) Count the number of sums that equal 9.
    There are 3 outcomes (3-6,4-5,5-4).
    There are 30 total outcomes.
    Please Login First :
    Tags:

    No Tags on this question yet!

    3 / 17

    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!

    4 / 17

    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.
    topology

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

    No Tags on this question yet!

    5 / 17

    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!

    6 / 17

    what is virtual memory.

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

    No Tags on this question yet!

    7 / 17

    What is the basic C structure.

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

    No Tags on this question yet!

    8 / 17

    Memory layout in c.

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

    No Tags on this question yet!

    9 / 17

    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!

    10 / 17

    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!

    11 / 17

    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!

    12 / 17

    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!

    13 / 17

    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!

    14 / 17

    What are the scheduling do you know.

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

    No Tags on this question yet!

    15 / 17

    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!

    16 / 17

    How you will used in thread.

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

    No Tags on this question yet!

    17 / 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)