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 / subbu

l=7 is the right answer, which is not given in the options.

Is This Answer Correct ?    10 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ctrl c called?

584


What is the use of typedef in c?

574


What is a far pointer in c?

588


Do pointers need to be initialized?

553


Explain how can I manipulate strings of multibyte characters?

770






Explain how can I write functions that take a variable number of arguments?

606


Write a program with dynamically allocation of variable.

597


Why static is used in c?

613


Explain how can type-insensitive macros be created?

564


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2640


What does emoji p mean?

589


In a switch statement, explain what will happen if a break statement is omitted?

618


What does static variable mean in c?

641


What is the use of putchar function?

643


What does it mean when the linker says that _end is undefined?

621