answersLogoWhite

0


Best Answer

A char is always 1 byte long, but may be signed or unsigned depending on the implementation. Explicitly signed or unsigned char types are treated as being independent types from the implicit char type (3 separate types).

A short (or short int) is at least 2 bytes long while a long (or long int) is at least 4 bytes long. Both are implementation-dependent with regard their actual size and sign, but, like char, may be explicitly signed.

Char, short and long are used to store integers (whole numbers). A char can store signed values in the range -128 to +127, or unsigned values in the range 0 to 255.

A double is at least 8 bytes long while its shorter counterpart, a float, is at least 4 bytes long. Both are implicitly signed, floating point values.

To determine the length of any type (including predefined types) us the sizeof operator.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: State and explain any 4 predefined data types in C plus plus programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between predifined data structure and user define data structure?

A predefined structure or, more generally, a predefined type, is a type that is defined internally by the compiler implementation. For instance Microsoft's implementation includes predefined runtime information and GUID structures, amongst other predefined types such as size_t. These types are built in to the compiler itself, so you won't find them in a header file. By contrast, user-defined structures (types) are those you define yourself, or are provided for you by a third party.


What are the different types of package in java?

1.user defined packages 2.predefined packages


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.


What is meant by pedefined types?

Predefined types are the primitives that are included in Java, such as char and int. They are already defined by the language, and so do not need to be developed by a developer or included from any package. There are also predefined classes, which do need to be imported, but are again part of the language specification so the developer does not need to reinvent the wheel each time they start a new project.


Java variable types and controls?

Java is a powerful language that gives us options to have data in different forms. We have several data types that we can use for our needs. The basic data types that java offers us are termed as Primitive Data Types. Though all programming languages have varied data types java offers us with a variety of data types that are much powerful and simplified to use when compared to other languages.The Java programming language is strongly-typed, which means that all variables must first be declared before they can be used. This involves stating the variable's type and name.int age = 10;The above statement tells the java compiler that a field named "age" which holds numeric data and having an initial value of 10 is declared. A variable's data type determines the values it may contain, plus the operations that may be performed on it. In addition to int, the Java programming language supports seven other primitive data types. A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other primitive values. The eight primitive data types supported by the Java programming language are:byte, short, int, long, float, double, char and boolean

Related questions

Explain different types of inheritance of object oriented programming?

== ==


What is a predefined text format with specific types of fonts?

A style.


Explain what linear programming is and what the various models are?

the sequential flow of processes usually linear and its has two types which are: Waterfall and Prototyping Model


What is the difference between predifined data structure and user define data structure?

A predefined structure or, more generally, a predefined type, is a type that is defined internally by the compiler implementation. For instance Microsoft's implementation includes predefined runtime information and GUID structures, amongst other predefined types such as size_t. These types are built in to the compiler itself, so you won't find them in a header file. By contrast, user-defined structures (types) are those you define yourself, or are provided for you by a third party.


Explain the historical development of human rights?

Explain the types of state duties imposed by all human rights treaties?


What are the different types of package in java?

1.user defined packages 2.predefined packages


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.


How are contractile vacuoles different from types of vacuoles?

Contractile vacuoles are formed when a food particle is engulfed. Their size depends on the size of food particle. They are not predefined. Other vacoules are predefined and exist whether the food particles are present in them or not.


How do you explain the types of transmission in detail?

explain the types of tranmission in details?


What are the types of backup Explain each?

What are the types of backup Explain each?


How are contractile vacuoles different from other types of vacuols?

Contractile vacuoles are formed when a food particle is engulfed. Their size depends on the size of food particle. They are not predefined. Other vacoules are predefined and exist whether the food particles are present in them or not.


What kind of programming is on Unimas?

UniMas is a television network that offers viewers different types of sports programming, talk and reality show programming and acquired programming. There are references online to former programming, upcoming programming and current programming for UniMas.