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 is a #include preprocessor?
What is volatile variable in c?
What is the basic structure of c?
What is New modifiers?
Write a program to find the biggest number of three numbers in c?
How do I round numbers?
How do you print an address?
How can you increase the size of a statically allocated array?
Explain how do you sort filenames in a directory?
What is the use of ?: Operator?
What is new line escape sequence?
Why does everyone say not to use gets?
What are the 4 data types?
What is calloc()?
What is union and structure?