Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Ciena Interview Questions

14.44K

Total Set :3



Top 10 Ciena Interview Questions With Answer

Question: 1 / 10

Introduce yourself.

Question: 2 / 10

What will be the output.
char *p = "ciena"
char ar[] = "ciena"
strlen(p);
strlen (ar);
strlen (&ar);

Answer:

5 5 5

Question: 3 / 10

Write your own strlen() program.

Question: 4 / 10

How to find the nth node from last in single linklist.

Answer:

void GetNthFromLast(struct node* head, int n)
{
int len = n, i;
struct node *temp = *temp1 = head;

while (temp != NULL)
{
if (len > 0)
{
temp = temp->next;
len--;
continue;
}

temp = temp->next;
temp1 = temp1->next;
}


if (len)
{
printf("\r\n Node in the given Linked list is not enough \r\n");
return;
}

printf ("%d\n", temp1->data);

return;
}

Question: 5 / 10

Allocate the memory for 2 int*. and free it. Now I had question. How free will know how many byte memory has to free.

Answer:

int *p;
p = (int *) malloc(2 * sizeof (int));

When memory allocation is done, the actual heap space allocated is one word larger than the requested memory. The extra word is used to store the size of the allocation and is later used by free( )

Question: 6 / 10

what will be the output of the below line.
int x = 100;
printf("%d",!x);

Answer:

0

Question: 7 / 10

What will be the size of the below structure. explain why size will be this only.
struct x
{
int p;
struct x *y;
char z;
char *b;
};

Answer:

16

Question: 8 / 10

What is difference in the below
char *p = "ciena"
char ar[] = "ciena"

Question: 9 / 10

Is there any abnormality if no the what will be output.
Sizeof (NULL)
Strlen(NULL);
sizeof(" ")

Answer:

4, 0, 1

Question: 10 / 10

ping Host A to host B, explain packet at each steps.
Host A> ping Host B

topology