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

20 bytes of memory is allocated to s
hence
l=strlen(s);//l=20
so answer is a

Is This Answer Correct ?    2 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different storage class specifiers in c?

611


What does the characters “r” and “w” mean when writing programs that will make use of files?

846


How can I recover the file name given an open stream?

546


What is the difference between struct and union in C?

559


What is the difference between Printf(..) and sprint(...) ?

777






explain what are actual arguments?

626


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

734


What is the process to create increment and decrement stamen in c?

581


What is the use of static variable in c?

587


What are different types of operators?

589


Write a program to generate random numbers in c?

651


Explain the difference between structs and unions in c?

565


How do you define structure?

555


How can I send mail from within a c program?

573


What is type qualifiers?

649