answersLogoWhite

0

In c language size of data type int?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

printf ("sizeof (int) is %d bytes", (int)sizeof (int));

Most likely it will be 2 or 4.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: In c language size of data type int?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is int in 'c' language?

data-type


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

Type 'int'


What is the data type int?

Data-type (short for integer).


Why does int has the same range as short?

The int is a data type in c, c++ or java, It can divided in to two parts that is short and long. Int short if of same size as int (2).


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 java int?

This groups includes byte,short,int and long.Integer data type is used for storing integer values.The size of the int is 32 bit.The range of the int is -2,147,483,648 to 2,147,483,648


What is difference between unsignedint and signedint in c language?

Unsigned int does not have a sign, meaning that it can be zero or a positive number in the range of data type (int). Signed data has a sign and can be positive, zero or negative.


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.*/


What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.


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:


Who decides size of data types in a language?

The people who create the language take the liberty of deciding the size of data types in a programming lanauage.If you (as a programmer) create your own custom data type, for example by defining a class, then you decide what goes into it - for example, in Java, if one of the pieces of data requires an integer, you have the choice of storing it as an int, which uses 4 bytes, or as a long, which uses 8 bytes (and permits larger numbers).


How can you get size of datatype?

like this: sizeof(int); replace int with the kind of data you want to find the size of. of course, to be able to do anything with this size data, you'll have to store it into a variable or display it or something.