GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 51 of 87    Print  
A memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed:
s="Entrance"
l=strlen(s);
what is the value of l ?

A. 20
B. 8
C. 9
D. 21


  
Total Answers and Comments: 5 Last Update: April 15, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 04, 2006 22:52:48   #1  
deepa        

RE: A memory of 20 bytes is allocated to a string decl...
the answer is 9
 
Is this answer useful? Yes | No
May 22, 2006 07:57:58   #2  
prabha        

RE: A memory of 20 bytes is allocated to a string decl...
Hi The answer is 8.
 
Is this answer useful? Yes | No
June 14, 2006 03:23:58   #3  
Mr X        

RE: A memory of 20 bytes is allocated to a string decl...
8 or 9
 
Is this answer useful? Yes | No
August 18, 2006 11:46:39   #4  
Priya        

RE: A memory of 20 bytes is allocated to a string decl...
The answer is 8



StrLen returns the number of characters in a string NOT counting the terminal null char.

 
Is this answer useful? Yes | No
April 15, 2007 10:35:38   #5  
Megha Shrivastav        

RE: A memory of 20 bytes is allocated to a string decl...
ans is 20
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape