Thursday, July 30, 2009

C: Why '&' not used to declare String or Character?

C questions. Pleas esend me this as early as possible





Regards





Varun

C: Why '%26amp;' not used to declare String or Character?
in c,%26amp; is used as a 'address of' operator,hence cannot be used to declare a character ,string and to declare u can use a pointer.
Reply:%26amp; symbol is a special symbol. You can give as a value for a string or a character. But any variable declartion should not start with symbols other than _(underscore). Usually %26amp; is used both as reference operator as well as "address operator". So it cant be used. Hope u understoold this.
Reply:%26amp; is a special charecter or symbol like $ # used as shortcuts
Reply:string in C is an array.


the symbol %26amp; can be represented as an character


char a='%26amp;';





a string example


char s[]="c%26amp;language";
Reply:%26amp; is address of operator in C


No comments:

Post a Comment