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

Ciena Interview Questions

23.74K

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.

Answer:

#include<stdio.h>


void strlength(char c[])

{

   char *p=c;

  int count=0;

  while(*p!=NULL)

  {

    *p++;

    count++;

  }

printf("%d",count);  

}

int main()

{

  char c[]="prachi katarua";

   strlength(c);

  return 0;

}

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"

Answer:

Char Pointer p is pointing to char string which is stored in code segment so that it can not change due to read only memory location but in second statement char array is stored in stack segment which can be modified during run time.

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