Yes it is possible in C language.
int main(void) { char *cptr; int *iptr; iptr=(int*)cptr; return 0; }
If you find the info useful Please Vote!!!
A pointer holds a memory address, from 0 to the upper limit of your memory (in 32 bit addressing this is up to 2^32, 64 bit is up to 2^64 bytes). So in math terms, a pointer could be considered a non-negative integer. However this is not the same as the integer type used in C and other languages, which refers to how the data at that memory address (the raw bits) is interpreted by the system. So the expression "int *x;" declares a pointer to an integer, but x is a memory address, not a literal C-style integer. The value pointed to by x, however, will be interpreted as a literal C-style integer. It may be easier to see using a pointer to a char: char character = 'C'; char *pointerToCharacter = character; In this case, character is a standard char variable, and pointerToCharacter is a pointer (which is a memory address) that points to the location in memory of a character.
In JavaA char in Java is a 16-bit integer, which maps to a subset of Unicode.In C A char in C is an 8-bit integer, which maps to standard ASCII.Note that in both Java and in C you can use a char value like a normal integer type: char c = 48;
char *ptr;
char* strcpy(const char* src, char* dst) { char* tmp = dst; while ((*dst++ = *src++) != '\0'); return tmp; }
Yes, with type-cast (but I don't see why you should): char *ptr = (char *)300;
in Unix: the datatype is "Date" in C++: the datatype is "char"
in Unix: the datatype is "Date" in C++: the datatype is "char"
Of course. But why? int *p = (int *)"string";
A pointer holds a memory address, from 0 to the upper limit of your memory (in 32 bit addressing this is up to 2^32, 64 bit is up to 2^64 bytes). So in math terms, a pointer could be considered a non-negative integer. However this is not the same as the integer type used in C and other languages, which refers to how the data at that memory address (the raw bits) is interpreted by the system. So the expression "int *x;" declares a pointer to an integer, but x is a memory address, not a literal C-style integer. The value pointed to by x, however, will be interpreted as a literal C-style integer. It may be easier to see using a pointer to a char: char character = 'C'; char *pointerToCharacter = character; In this case, character is a standard char variable, and pointerToCharacter is a pointer (which is a memory address) that points to the location in memory of a character.
The CHAR datatype uses a fixed length, where as the VARCHAR datatype can be variable in length up to the maximum value specified for the length. If you insert "Hello" into a CHAR(10) field, the column would actually contain "Hello " with 5 trailing spaces. The same value inserted in a VARCHAR(10) field would contain "Hello". char datatype is fixed length data type and it store maximum 255 characters while varchardatatype store up to 4000 character of variable length datatype
In JavaA char in Java is a 16-bit integer, which maps to a subset of Unicode.In C A char in C is an 8-bit integer, which maps to standard ASCII.Note that in both Java and in C you can use a char value like a normal integer type: char c = 48;
variable declared with primitive datatype are called as primitive variable. ex: short s=12; char ch='a'; here in above case ch,s are declared with primitive datatype of short and char so it is called as primitive variables.. thanx, from rajesh adepu.
You can declare pointer-variables, if that's what you mean. Example: char *sample = "Sample";
char *ptr;
In different languages we have different datatypes . Like in c++ we have int for integers , string for strings . In database we have datatypes, number for storing integer and varchar2 for storing string or characters.Like in languages like c we have datatypes such as char for characters , int for integers etc . In database we have datatype to denote the type of the field example numbers for storing integer, Varchar for characters.
char* strcpy(const char* src, char* dst) { char* tmp = dst; while ((*dst++ = *src++) != '\0'); return tmp; }
I'll give you an example: char *s;