Interview Questions and Answers :: Alcatel-Lucent
Home > Experience Archives > Alcatel-Lucent > Interview Question Set 1 > Discussion
5. char *x = "alcatel"
char y[18] = "alcatel"
a. What will the the sizeof (x) and sizeof (y), strlen(x),strlen(y)
b. Whether the below statement is correct.
x++, y++
c. Whether the below statement is correct.
x[0]='L'
y[0]='L'
d. What if we allocate the memory and then
x=malloc(10)
y=malloc(10)
now perform the step b.
e. After the step c what will be the sizeof (x),sizeof(y)
f. What will be strlen(x), strlen(y);
Answer:
No Discussion on this question yet!
No Discussion on this question yet!