Click To Get Off-Campus Placement Jobs Info !!!
FREE!!! Latest Nagarro FULL Aptitude Mock Test for Practice
Practice 5+ Mettl Aptitude Mock Test

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.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

2 / 12

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

#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);
}
}
Tags:

No Tags on this question yet!

3 / 12

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

{
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;
}
Tags:

No Tags on this question yet!

4 / 12

How to find the nth node in linklist from back.

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;
}
Tags:

No Tags on this question yet!

5 / 12

What is volatile.

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.

Tags:

No Tags on this question yet!

6 / 12

What is mutex and semaphore, what is difference in both, is binary

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 12

what is virtual memory.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 12

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

No Discussion on this question yet!
Tags:

No Tags on this question yet!

9 / 12

How to implement sizeof operator.

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

No Tags on this question yet!

10 / 12

Some basic networking question

No Discussion on this question yet!
Tags:

No Tags on this question yet!

11 / 12

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

No Discussion on this question yet!
Tags:

No Tags on this question yet!

12 / 12

Some questions from project specific.

No Discussion on this question yet!
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 / 11

common question i.e introduce your self.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

2 / 11

Some general questions from c and os.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

3 / 11

pkt flow in broadcom, l2 and l3 pkt.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

4 / 11

How to debug in bcm shell.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

5 / 11

Moving deeper in question 4, how to set particular register, how to track pkt drop,port hit etc, how many multicast/unicast pkt.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

6 / 11

How to see particular register value in broadcom.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 11

Some question from trill, how, what you did.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 11

How to find how many bit set in a number.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

9 / 11

How to check if particular bit set or not in a number.

hello
Tags:

No Tags on this question yet!

10 / 11

One program he just shared at webex and he asked me to find out the defect in it. Basically in program allocating memory using melloc and it was not freed, that was defect as per me in program.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

11 / 11

Can you explain L2 pket header.

No Discussion on this question yet!
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 / 8

No Discussion on this question yet!
Tags:

No Tags on this question yet!

2 / 8

No Discussion on this question yet!
Tags:

No Tags on this question yet!

3 / 8

Can you explain step by step Packet flow in BCM.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

4 / 8

Why you are looking for change.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

5 / 8

qThere were multiple Question related to project.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

6 / 8

Some question from router, like if two host connected to router,and pinging from one host to other host , what are all the configuration needed.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 8

ping pkt flow in question 6, echo request to till echo reply.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 8

Then one question from function pointer. i.e where and how to use it.

No Discussion on this question yet!
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 / 8

Draw the architecture, in which you are working, i.e pkt flow in it. then there were multiple question in it.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

2 / 8

What are the defect I have worked on.

No Discussion on this question yet!
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

No Discussion on this question yet!
Tags:

No Tags on this question yet!

4 / 8

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

No Discussion on this question yet!
Tags:

No Tags on this question yet!

5 / 8

How to define a node of linklist,

typedef struct node{
int data;
struct node* next;
}node;
self referential structure
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.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 8

Write a proram to reverse the linklist.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 8

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

{

if ( tmp != NULL)

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

}
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?

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

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

No Discussion on this question yet!
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.

No Discussion on this question yet!
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.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

6 / 17

what is virtual memory.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 17

What is the basic C structure.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 17

Memory layout in c.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

9 / 17

Can you write a program to show stack is growing.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

10 / 17

Write a program a mirror copy of a BST.

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;
}
}
Tags:

No Tags on this question yet!

11 / 17

what is signal, Which signal can't be handle.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

12 / 17

How you detect dedlock, If you found, how you prevent it.

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

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.

Tags:

No Tags on this question yet!

13 / 17

What is fragmentation, what is internal/external fragmentation.

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

Tags:

No Tags on this question yet!

14 / 17

What are the scheduling do you know.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

15 / 17

No Discussion on this question yet!
Tags:

No Tags on this question yet!

16 / 17

How you will used in thread.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

17 / 17

Do you know brk() and sbrk,

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.

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

No Discussion on this question yet!
Tags:

No Tags on this question yet!

2 / 8

He shared one program over webex and asked to find out the problem, so basically the program is multi thread, and deadlock condition was happening, Then he asked me, how you will prevent it.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

3 / 8

What is static variable.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

4 / 8

Write a multi thread program. where proper sync is happening. have to write at webex.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

5 / 8

Do you know QoS.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

6 / 8

What is vlan.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

7 / 8

Do you know filtering in Broadcom. Explain in detail.

No Discussion on this question yet!
Tags:

No Tags on this question yet!

8 / 8

Any challenging issue you faced.