Cavium Networks Interview Questions and Answers for 5 years Experience
1 / 16
No Discussion on this question yet!
No Tags on this question yet!
2 / 16
No Discussion on this question yet!
No Tags on this question yet!
3 / 16
No Discussion on this question yet!
No Tags on this question yet!
4 / 16
A private VLAN domain has only one primary VLAN. Each port in a private VLAN domain is a member of the primary VLAN; the primary VLAN is the entire private VLAN domain.
Secondary VLANs provide isolation between ports within the same private VLAN domain. The following two types are secondary VLANs within a primary VLAN:
Isolated VLANs—Ports within an isolated VLAN cannot communicate directly with each other at the Layer 2 level.
Community VLANs—Ports within a community VLAN can communicate with each other but cannot communicate with ports in other community VLANs or in any isolated VLANs at the Layer 2 level.
http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/PrivateVLANs.html
No Tags on this question yet!
5 / 16
No Discussion on this question yet!
No Tags on this question yet!
6 / 16
No Discussion on this question yet!
No Tags on this question yet!
7 / 16
No Discussion on this question yet!
No Tags on this question yet!
8 / 16
No Discussion on this question yet!
No Tags on this question yet!
9 / 16
No Discussion on this question yet!
No Tags on this question yet!
10 / 16
No Discussion on this question yet!
No Tags on this question yet!
11 / 16
No Discussion on this question yet!
No Tags on this question yet!
12 / 16
The first monkey is let out, and runs along the doors opening every one. The second monkey is then let out, and runs along the doors closing the 2nd, 4th, 6th,... all the even-numbered doors. The third monkey is let out. He attends only to the 3rd, 6th, 9th,... doors (every third door, in other words), closing any that is open and opening any that is closed, and so on. After all 100 monkeys have done their work in this way, what state are the doors in after the last pass, which doors are left open and which are closed?
Consider door number 56, monkeys will visit it for every divisor it has. So 56 has 1
No Tags on this question yet!
13 / 16
No Discussion on this question yet!
No Tags on this question yet!
14 / 16
No Discussion on this question yet!
No Tags on this question yet!
15 / 16
No Discussion on this question yet!
No Tags on this question yet!
16 / 16
No Discussion on this question yet!
No Tags on this question yet!
1 / 6
No Discussion on this question yet!
No Tags on this question yet!
2 / 6
No Discussion on this question yet!
No Tags on this question yet!
3 / 6
No Discussion on this question yet!
No Tags on this question yet!
4 / 6
No Discussion on this question yet!
No Tags on this question yet!
5 / 6
void ownMemCpy(void *dest, void *src, size_t n)
{
char *src_l = (char *)src;
char *dest_l = (char *)dest;
for ( int i=0; i
}
No Tags on this question yet!
6 / 6
No Discussion on this question yet!
No Tags on this question yet!
1 / 11
No Discussion on this question yet!
No Tags on this question yet!
2 / 11
No Discussion on this question yet!
No Tags on this question yet!
3 / 11
No Discussion on this question yet!
No Tags on this question yet!
4 / 11
No Discussion on this question yet!
No Tags on this question yet!
5 / 11
No Discussion on this question yet!
No Tags on this question yet!
6 / 11
No Discussion on this question yet!
No Tags on this question yet!
7 / 11
Ex.
| 1 2 3 4 |
| 5 6 7 8 |
| 9 10 11 12 |
| 13 14 15 16 |
OutPut:
For i=0
1 2 3 4 8 12 16 15 14 12 9 5 6 7 11 10
for i=1
1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7
void ClockwisespiralPrint(arr[4][4], int m, int n)
{
int i = 0, k = 0, l = 0;
while (k < m && l < n)
{
for (i = l; i < n; ++i)
{
printf(" %d ", arr[k][i]);
}
k++;
for (i = k; i < m; ++i)
{
printf(" %d ", arr[i][n-1]);
}
n--;
if ( k < m)
{
for (i = n-1; i >= l; --i)
{
printf(" %d ", arr[m-1][i]);
}
m--;
}
if (l < n)
{
for (i = m-1; i >= k; --i)
{
printf(" %d ", arr[i][l]);
}
l++;
}
}
}
int main()
{
int arr[4][4] = {
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12},
{13, 14, 15, 16}
};
ClockwisespiralPrint(arr, 4, 4);
return 0;
}
For anti-clockwise reverse the operation;
No Tags on this question yet!
8 / 11
No Discussion on this question yet!
No Tags on this question yet!
9 / 11
No Discussion on this question yet!
No Tags on this question yet!
10 / 11
No Discussion on this question yet!
No Tags on this question yet!
11 / 11
No Discussion on this question yet!
No Tags on this question yet!
1 / 6
No Discussion on this question yet!
No Tags on this question yet!
2 / 6

No Discussion on this question yet!
No Tags on this question yet!
3 / 6
No Discussion on this question yet!
No Tags on this question yet!
4 / 6
No Discussion on this question yet!
No Tags on this question yet!
5 / 6
No Discussion on this question yet!
No Tags on this question yet!
6 / 6
No Discussion on this question yet!
No Tags on this question yet!