answersLogoWhite

0

Use the address-of operator:

char c=32; // space character

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

User Avatar

Wiki User

11y 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.


What is declaring pointer variable?

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


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


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


Can you make an integer pointer variable to char data?

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


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


What is pointers in c?

a pointer is a variable .it specify the address of the particular variable ,the &amp; symbol is to specify the address of the variable.