answersLogoWhite

0

How do you declare data types?

Updated: 8/11/2023
User Avatar

Wiki User

14y ago

Best Answer

typedef data_type data_name, for instance:

typedef int myDataType;

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

For Java and C: dataType varriableName = someValue; (ex. int number = 12; )

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you declare data types?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the properties of data types?

When we enter a variable then we know it what type it belong ,but the compiler does not know it ,for knowing it we declare data types. Storage representations & machine instructions to handle constants differ from machine to machine.The variety of data types available allow the programmer to select the type appropriate to the needs of the application as well as the machine. ANSI C supports 3 types of data types 1.Primary data types 2.Derived data types 3.User defined data types JAVA has 2 types 1.In Built data types 2.User Defined datatypes


Can Array List in java hold different data types?

No, we cant hold different data types in an Array. But using Array List we can hold any data type as a Object. But you need iterate that values as a Object and again you need to convert those values into the different data types accordingly.


Is built-in data-type are abstract data-types in java?

All built-in data types are not abstract data types.


What is datatype.Define various types of data types?

In c language data types are used to specify the tye of data.for ex:int a;It means "a" is a variable of type integer.There are two types of data types in c.They areprimary data typessecondary data typesprimary data types are the built in data types and secondary data types are the user defined data types.eg for primary data types are int,float,char,long,double..and for secondary are arrays,structures,pointers,unions..


What are the subject-matters of data structure?

types of data structure types of data structure

Related questions

Types of data used in programming?

Programmers have to declare various data types while coding in order to inform the computer how to handle them. The types include numbers, arrays, characters, booleans and structures.


What are the properties of data types?

When we enter a variable then we know it what type it belong ,but the compiler does not know it ,for knowing it we declare data types. Storage representations & machine instructions to handle constants differ from machine to machine.The variety of data types available allow the programmer to select the type appropriate to the needs of the application as well as the machine. ANSI C supports 3 types of data types 1.Primary data types 2.Derived data types 3.User defined data types JAVA has 2 types 1.In Built data types 2.User Defined datatypes


Can Array List in java hold different data types?

No, we cant hold different data types in an Array. But using Array List we can hold any data type as a Object. But you need iterate that values as a Object and again you need to convert those values into the different data types accordingly.


Is built-in data-type are abstract data-types in java?

All built-in data types are not abstract data types.


What is datatype.Define various types of data types?

In c language data types are used to specify the tye of data.for ex:int a;It means "a" is a variable of type integer.There are two types of data types in c.They areprimary data typessecondary data typesprimary data types are the built in data types and secondary data types are the user defined data types.eg for primary data types are int,float,char,long,double..and for secondary are arrays,structures,pointers,unions..


What are the different data types?

Theres two types of data, Continuous and discontinuous data.


What are the subject-matters of data structure?

types of data structure types of data structure


Why do you need data types?

Data types specify which types of data that an object or variable can hold. Without data types, it would be impossible to make sure that an application functions properly.


What are the different types of data?

Types of data types :Primitive data typeUser-defined data typeDerived Data typePrimitive data type:int,char,float,double,voidUser-Defined data type:class,enumeration,structure,unionDerived Data type:Arrays,Functions,Pointers.


What type is data?

There Are Two main types of data. Qualitative data are expressed As numbers, obtained by counting or measuring. Another type of data is called an inference.An inference is a logical interpretation based on prior knowledge or experience.


What are the three types of master data discussed in this exercise?

The three types of master data discussed are reference data and enterprise data. Lastly, there is also market master data.


What are the various data types for entering records?

Data types for entering records depend on the nature of data