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
What is %lu in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
Write a simple code fragment that will check if a number is positive or negative.
How can I direct output to the printer?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is c standard library?
please give me some tips for the placement in the TCS.
What is the code for 3 questions and answer check in VisualBasic.Net?
What are the types of pointers in c?
What is the advantage of c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
How can I read in an object file and jump to locations in it?
What is an arrays?
What is the difference between array and pointer?
What is bss in c?