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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / subbu
l=7 is the right answer, which is not given in the options.
| Is This Answer Correct ? | 10 Yes | 8 No |
Answer / 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 |
Answer / sivasankar.a
the answer is c)9 because of "etrance"this word lengh is 9.
| Is This Answer Correct ? | 3 Yes | 19 No |
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
Define Array of pointers.
Differentiate between new and malloc(), delete and free() ?
Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.
wap in c to accept n number display the highest and lowest value
in a town the percentage of men is 52 the percentage of total literacy is 48 if total percentage of literate men is 35 of the total population write a program to find the total no of the literate men and women if the population of the town is 80000
What is the difference between c and python?
What are different types of pointers?
program to print upper & lower triangle of a matrix
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)
Concat two string with most overlapped substring has to removeĀ "abcd"+ "cdef" = "abcdef
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5