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
What is pivot in c?
How do you print an address?
How we can insert comments in a c program?
write a proram to reverse the string using switch case?
How are strings stored in c?
What is meant by type casting?
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);
Define the scope of static variables.
Tell me when is a void pointer used?
How do we make a global variable accessible across files? Explain the extern keyword?
Explain threaded binary trees?
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'); }
What are the types of arrays in c?
What are global variables and explain how do you declare them?
How can I trap or ignore keyboard interrupts like control-c?