Use the address-of operator:
char c=32; // space character
std::cout<<&c<<std::endl;
No. The address of a float can only be assigned to a variable of type pointer to float. Any other (coerced) use is outside of the definition, implementation, and portability of the language.Yes, with typecast, but it is entirely pointless:float f;char c = (char)&f;
One by one: char x; char y; & both together char x,y;
You can't convert the data type of any variable.
char c = 'a'; 'a' is a literal character, which assigns the value 0x61 (ASCII code 97 decimal) to the char variable c. The following lines are therefore equivalent: char a = 0x61; char b = 97; char c = 'a';
You can define a data-type called 'address': 1. typedef void *address; 2. typedef struct address { char country [32]; char state [32]; ... } address.
No. The address of a float can only be assigned to a variable of type pointer to float. Any other (coerced) use is outside of the definition, implementation, and portability of the language.Yes, with typecast, but it is entirely pointless:float f;char c = (char)&f;
What do you mean by 'long address'?1. If you are asking about 'near' and 'far' pointers, then you should forget them; simply use Huge Memory Model.2. If you mean the address of a 'long int'-type variable, then yes, with type-cast:long l;char *p = (char *)&l;Note: for generic pointers you can use type void *
One by one: char x; char y; & both together char x,y;
Char is fixed length, while Varchar is variable length.
You can't convert the data type of any variable.
I'll give you an example: char *s;
char c = 'a'; 'a' is a literal character, which assigns the value 0x61 (ASCII code 97 decimal) to the char variable c. The following lines are therefore equivalent: char a = 0x61; char b = 97; char c = 'a';
You can define a data-type called 'address': 1. typedef void *address; 2. typedef struct address { char country [32]; char state [32]; ... } address.
The statement char ch = 'z'; would store the character 'z' in the variable ch. This means that the variable ch would hold the value 'z'.
Of course. But why? int *p = (int *)"string";
static storage class in C tells that: The variable will have the default value as zero. The variable scope will be the file in which it is defined. RaVi
a pointer is a variable .it specify the address of the particular variable ,the & symbol is to specify the address of the variable.