a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
Answer Posted / fazlur rahaman naik
the string is Entrance or Etrance?
if it is Entrance,then only the answer is here.
b is the right answer.
because string length means it will count only the no.of
characters in that string only...not the null character.
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
What are the loops in c?
Can include files be nested?
What is array in C
What is a const pointer in c?
How can you increase the allowable number of simultaneously open files?
application attempts to perform an operation?
Write a program with dynamically allocation of variable.
What is getch () for?
why wipro wase
What is difference between arrays and pointers?
What is string function in c?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
What are the basic data types associated with c?
Why is c so popular?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above