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
Is c still relevant?
How do we open a binary file in Read/Write mode in C?
When can a far pointer be used?
How can I do serial ("comm") port I/O?
How can I write functions that take a variable number of arguments?
What kind of structure is a house?
What does a function declared as pascal do differently?
What is the difference between c &c++?
write a program to print largest number of each row of a 2D array
What is indirection in c?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What is a dynamic array in c?
Hi can anyone tell what is a start up code?
Under what circumstances does a name clash occur?
How can I call fortran?