The char data type is an integral type and can therefore be used to represent integers as well as characters. However, in order to treat the representation as an actual integer, it must be explicitly converted to a non-character type, such as int.
Pascal has 4 primitive data types: integer; boolean; char and; real. These 4 provide the basic building blocks for more complex types.
A variable has a data type such as integer, string, double. A data type tells the variable to only store values that are a particular data type, so you can only store numbers without decimal points in an integer variable, and only characters such as "ABCD" in a string variable.
Yes it is possible in C language.includeint main(void) { char *cptr; int *iptr; iptr=(int*)cptr; return 0; }If you find the info useful Please Vote!!!
Only Objects can be used as generic arguments. Primitives Data Types (int, long, char ...) are not objects. But you can use Integer, an Object that wrap the data type int instead.
char is a primitive data type and depends on the programming language and the operating system.
Of course. But why? int *p = (int *)"string";
Pascal has 4 primitive data types: integer; boolean; char and; real. These 4 provide the basic building blocks for more complex types.
Declare a structure with integer and character data members in it. Eg:struct node{int integer;char character;};Now you can use this structure definition to store the values. Eg:struct node temp;//declaringtemp.integer = 5;temp.character = 'a';
A variable has a data type such as integer, string, double. A data type tells the variable to only store values that are a particular data type, so you can only store numbers without decimal points in an integer variable, and only characters such as "ABCD" in a string variable.
Yes it is possible in C language.includeint main(void) { char *cptr; int *iptr; iptr=(int*)cptr; return 0; }If you find the info useful Please Vote!!!
Only Objects can be used as generic arguments. Primitives Data Types (int, long, char ...) are not objects. But you can use Integer, an Object that wrap the data type int instead.
integer data type
char is a primitive data type and depends on the programming language and the operating system.
When you type '1' in a C++ program, it is considered to be of character data type(char). When you type 1, it is considered to be of integer data type.
Turbo C variables are memory place holders for storage of data during the execution of a Turbo C program. Types of variables include integer, real and char.
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.
1. If its natural or integer numbers- Integer(Int) data type. 2. If it consists of decimal or fraction part- Double or float data type. 3. If it has a single letter or sign- Character(Char) data type. 4. If its got many words(alpha-numerical)- String data type. 5. If the result has to be "true" or "false"- Boolean data type.