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 / sivasankar.a

the answer is c)9 because of "etrance"this word lengh is 9.

Is This Answer Correct ?    3 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pivot in c?

558


How do you print an address?

728


How we can insert comments in a c program?

619


write a proram to reverse the string using switch case?

2453


How are strings stored in c?

577






What is meant by type casting?

616


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1341


Define the scope of static variables.

594


Tell me when is a void pointer used?

638


How do we make a global variable accessible across files? Explain the extern keyword?

1407


Explain threaded binary trees?

666


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

684


What are the types of arrays in c?

612


What are global variables and explain how do you declare them?

561


How can I trap or ignore keyboard interrupts like control-c?

605