answersLogoWhite

0

Use the address-of operator:

char c=32; // space character

std::cout<<&c<<std::endl;

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Address of a float can be assigned to a char?

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;


Can char pointer contain long address in c?

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 *


How do you declare two character variable?

One by one: char x; char y; &amp; both together char x,y;


Difference between char and varchar datatypes?

Char is fixed length, while Varchar is variable length.


How do you convert char array into unsigned char array in c?

You can't convert the data type of any variable.


How do you code a character literal?

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';


What is declaring pointer variable?

I'll give you an example: char *s;


Is address a user-defined data type?

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 equals 'z' would store in ch?

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'.


What is the difference between char and varchar2 in dbms?

no diff between varchar and varchar2 char store only chacter type but varchar2 store variable chacters. also varchar2 shirinks the space if not fully filled but char cant.


What is static char in C?

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


Can you make an integer pointer variable to char data?

Of course. But why? int *p = (int *)"string";