answersLogoWhite

0


Best Answer

The C language standard permits a bitfield to be defined as a singled or unsigned integer with the given size (in bits), and it permits that individual implementations define the container, thus define the maximum size of a single bitfield. Some implementations also supply additional, non-standard language extensions to control the size of the bitfield container, allowing, for example, a choice between a 16 and a 32 bit container. No single bitfield can exceed the container's size.

The reason why only integer scalars are supported with bitfields is that only those have a meaning for arbitrary-length implementations. An unsigned bitfield of N bits accepts values in the 0...2^N-1 range, for example. Other scalar types such as float, double, etc, have an implementation-specific implied size (for example, 32 bits for a single precision floating point type or 64 bits for a double-precision floating point type). Those types have no defined interpretation of an arbitrary size. They could, but they don't.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why you use only int data type in bitfied int c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the data type int?

Data-type (short for integer).


Where string is primitive data type of string data type?

String is not primitive data. Only char,int,double,and boolean are!


What defines a data type?

the type of data which we store in a variable.. example: int a=10; /*here a is variable (data) which is of type int and stores a value 10.*/


Why java not use int as a generic argument?

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.


Why can't have only float data type instead int and float?

Because that is how the language is defined. It has floating data types and integral data types.


What is int in 'c' language?

data-type


Suggest the data type that can be used for initializing alphanumeric elements in a c programmed array .Also tell you the compiler that can understand the data type.?

Data Type : - It is used to identify the type of data. 'C' Language has a large no of data type, Thus it is also known by rich data type language: Data type are generally classified in three group: 1: Fundamental data type 2 Derived Data Type : 3 Use defined data type; 1 Fundamental data type: Fundamental data type includes i) The int data type: The data type int can store integer value only for eg. 14, 45, 78 declaration: int a,b; here we can store any value in variable a & b. ii) Char Data Type : The data type char can store character value only which is enclosed with single quote for e.g. 'c' declaration : char x = 'c' iii) Float Data Type:


What is data type and field name?

Data Type defines the type of data that will be stored. Example : int, byte, short etc


How do you make an array of 56?

In Java:int[] myArray;// or: int myArray[]followed by:myArray = new int[16];Instead of int, you can use any other data type, including a class.


The int data type requires more memory than the double data type?

No, the int variable uses less memory, and therefore it is preferable to use an int rather than a double where you can.A boolean variable uses even less memory, but obviously is useful only in limited circumstances.


What is the abbrevations for int?

"int" is the abbreviation for an integer data type. In Java an int is specifically a 32-bit signed integer.


What are the valid type of data that the main can return in c language?

Type 'int'