[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

19.01K

## 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);

5 5 5

##### Question: 3 / 10

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

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.

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

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

16

##### Question: 8 / 10

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

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(" ") 