Question & Additional Information
 
How can a character and a string with only one character can be differentiated? What is the internal difference between a character and string, with only one character in it?
Add to My IQ
 

 | 
Inappropriate
Answer Title
Answer
There are various things to be observed for this
1. First of all while at the time of storing
      single character is stored as char abc = 's';
         where as string having single character can be stored as char pqr[] = "s";
2. single character takes one byte for storage
    String (even single character is stored) takes two bytes, one for one character and second for null character
    This can be verified by following C statement:
       printf("%d %d", sizeof(abc), sizeof(pqr));
    which gives output as 1 and 2 respectively. (assuming turbo C compiler and 1 byte for char)
Question Tag Title
Tags
Question Asked At Title
Asked At
None
Question Job Title
Job Titles


Check out our newest job listings!

Post a Job! $49 for 60 days



Your Name:
Add your comment text
 
Related Questions
Related Questions
Flag this interview question as inappropriate Inappropriate
See Answer
There are numerous good possibilities:
Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise, Initiative, Patience, Hard work, Creativity, Problem solver.
Click here to improve the Interview Question, Answer and other fields.
Comments (1) :
1.
bbfromdc
Sunday, October 12, 2008 8:02 AM
I simply love my supervisor Is it okay ?
Flag this interview question as inappropriate Inappropriate
See Answer
The part of a URL passed by an HTTP request to invoke a servlet. A URL path consists of the context path + servlet path + path info, where Context path is the path prefix associated with a servlet context of which the servlet is a part. If this context is the default context rooted at the base of the Web server's URL namespace, the path prefix will be an empty string. Otherwise, the path prefix starts with a / character but does not end with a / character.

Servlet path is the path section that directly corresponds to the mapping that activated this request. This path starts with a / character.
Create Date
:
Tuesday, May 13, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
string md5(string)
It calculates the MD5 hash of a string. The hash is a 32-character hexadecimal number.
Create Date
:
Sunday, May 11, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length),and can store any character text.
Create Date
:
Sunday, April 27, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
(A question about your Endurance when on the job)
Create Date
:
Sunday, April 27, 2008
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
Endurance
Create Date
:
Saturday, April 12, 2008
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
 
• More Related Questions: