NEC Technologies India Interview Questions and Answers
1 / 13
No Discussion on this question yet!
No Tags on this question yet!
2 / 13
It can be verified based on packets ERROR CODE in BCM.
No Tags on this question yet!
3 / 13
No Discussion on this question yet!
No Tags on this question yet!
4 / 13
you can refer
https://blog.packet-foo.com/2017/03/programmable-asics-in-cisco-switches/comment-page-1/
No Tags on this question yet!
5 / 13
create group,
create Fp entry,
fp priority set,
qualifier set,
values to the qualifier and
install.
No Tags on this question yet!
6 / 13
No Discussion on this question yet!
No Tags on this question yet!
7 / 13
No Discussion on this question yet!
No Tags on this question yet!
8 / 13
No Discussion on this question yet!
No Tags on this question yet!
9 / 13
int a=2;
if (a=0)
printf("a is non zero");
elseif(a>0)
printf("a is +ve");
else
printf("a is zero");
it will not give compilation error, the if condition is proper,
it will be executed as like value "0" will be assigned to a and then it will check the if condition.
basically when we put any condition in if condition it check 0/1 like if (p==5) if p value is 5 then for this condition it will be something like if(1) in other scenario like if p is not equal to 5 then statement will be like if(0).
Such thing is happening in the given partial code, the last statement will be like if (0), which is false and control will go to else part. so that answer will be a is zero. However if you put a=5 then it will print a i non zero.
No Tags on this question yet!
10 / 13
int n;
int a=0;
scanf("%d",&a);
n=a;
while (n>2)
{
if(n%2!=0)
{
n=n/2;
if (n>=2)
{
printf("%d is prime number", a);
break;
}
}
else
{
printf("%d is not prime number", a);
break;
}
}
No Tags on this question yet!
11 / 13
int a[]= {2,3,4,7,9,3,8,9,6,8,7,9};
int i=0;
int j=0;
int flag=0;
int n=12;
static int incr;
for (i=0;i
for(j=0;j
if (a[i]==a[j])
{
incr++;
if (incr>=2)
flag=1;
}
}
if (flag)
printf("\n %d is repeated %d times in this array", a[i],incr);
flag=0;
incr=0;
}
No Tags on this question yet!
12 / 13
No Discussion on this question yet!
No Tags on this question yet!
13 / 13
Policing
======
Traffic policing is nothing but where metering can be applied with bucket algorithm which is used for classifying(coloring) the packets and use policer to set specified set of actions for each classified packets accordingly.
Traffic policing will applied in the ingress pipeline.
Shaping
=======
Shaping is also a kind of rate limiting where can set a rate limit beyond which packets are dropped.
Shaping can be applied to a queue which is called queue shaping of the specific ethernet egress port.
Shaping will be applied to the Egress pipeline,
No Tags on this question yet!
1 / 15
No Discussion on this question yet!
No Tags on this question yet!
2 / 15
No Discussion on this question yet!
No Tags on this question yet!
3 / 15
No Discussion on this question yet!
No Tags on this question yet!
4 / 15
No Discussion on this question yet!
No Tags on this question yet!
5 / 15
No Discussion on this question yet!
No Tags on this question yet!
6 / 15
I found good explanation related to RED and WRED at below cisco link.
http://www.ciscopress.com/articles/article.asp?p=352991&seqNum=8
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conavd/configuration/15-mt/qos-conavd-15-mt-book/qos-conavd-wred-ecn.html
No Tags on this question yet!
7 / 15
No Discussion on this question yet!
No Tags on this question yet!
8 / 15
int a[]= {2,3,4,7,9,3,8,9,6,8,7,9};
int i=0;
int j=0;
int n=12;
int sum=12;
for (i=0;i
for(j=++i;j
if ((a[i]+a[j]) == sum)
{
printf("\n %d + %d positions of sum %d", a[i], a[j], sum);
continue;
}
}
}
No Tags on this question yet!
9 / 15
No Discussion on this question yet!
No Tags on this question yet!
10 / 15
int detectLoop(struct node *head)
{
struct node *slow = list, *fast = head;
while (slow && fast && fast->next )
{
slow = slow->next;
fast = fast->next->next;
if (slow == fast)
{
printf("\r\nLoop detected in linked list \r\n");
removeloop(slow, head);
}
}
return 0;
}
void removeLoop(struct node *loop_node, struct node *head)
{
struct node *ptr1;
struct node *ptr2;
ptr1 = head;
while (1)
{
ptr2 = loop_node;
while (ptr2->next != loop_node && ptr2->next != ptr1)
{
ptr2 = ptr2->next;
if (ptr2->next == ptr1)
break;
ptr1 = ptr1->next;
}
}
ptr2->next = NULL;
}
No Tags on this question yet!
11 / 15
int i=1;
if ((*(char*)&i) == 1)
printf("LE");
else
printf("BE");
No Tags on this question yet!
12 / 15
unsigned int i=0xABABCDAB;
int b=0;
for(b=31;b>0;b--)
{
if (b<16 && b>7)
i=(1< }
printf("\n NEW i = %X \r\n", i);
No Tags on this question yet!
13 / 15
No Discussion on this question yet!
No Tags on this question yet!
14 / 15
No Discussion on this question yet!
No Tags on this question yet!
15 / 15
No Discussion on this question yet!
No Tags on this question yet!