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
Can i use “int” data type to store the value 32768? Why?
What is structure pointer in c?
Give me the code of in-order recursive and non-recursive.
What is c++ used for today?
What is pass by reference in c?
What is wrong with this code?
What is a wrapper function in c?
Why is %d used in c?
In C, What is the #line used for?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Explain how do you sort filenames in a directory?
what are the facialities provided by you after the selection of the student.
What does node * mean?
What 'lex' does?
Why isn't it being handled properly?