Define the data type modifiers in c language, C/C++ Programming

Assignment Help:

Define the Data Type Modifiers in C language?

There are three data types(int, float & double) above have the following modifiers.

1. short
2. long
3. signed
4. unsigned

The modifiers define the amount of storage allocated to the variable.

The Integer quantities can be defined as short int, unsigned int or long int. Short int may need less memory than an ordinary int in word length. likewise a long int may require the same amount or more amount of memory but it will never be less than an ordinary int. An unsigned has the similar memory requirements, as an ordinary int. An unsigned int can be roughly twice as large as an ordinary int. Unsigned integer size varies from 0 to 65535 and the unsigned prefix indicates that the object is a nonnegative integer. Every unsigned type provides the same size storage as its signed equivalent. For instance int reserves the same storage as unsigned int and for the reason that a signed type reserves a sign bit an unsigned type can hold a larger positive integer than the equivalent signed type.

The following instance defines the short int variable flag:

short int flag;

The following illustration defines the unsigned long int variable ss_number as having the initial value 438888834:
unsigned long ss_number = 438888834;

The Data type modifiers, unsigned or signed may be explicitly applied to char while unsigned chars have values between 0 and 255 signed chars have values from -128 to 127. The modifiers long float and long double can as well be used explicitly.


Related Discussions:- Define the data type modifiers in c language

Identifier and constant, What are  Id e n t i f ie rs a n d C o...

What are  Id e n t i f ie rs a n d C o n s t a n ts in C++? Id e n t i f ie r a n d C o n s t a n t : I d e n t i f ie r

Algorithms flow charts and psuedocode, How to write C program (interest cal...

How to write C program (interest calculator) the simple interest on a loan is calculated by the formula interest=principal*rate*days/365; ?

Enumeration types, Write a simple program in C++ to investigate the safety ...

Write a simple program in C++ to investigate the safety of its enumeration types. Include at least 10 different operations on enumeration types that are incorrect/unsafe things to

What is structure, What is Structure? An Array is a data structure who...

What is Structure? An Array is a data structure whose elements are all of the similar data type. The structure is a data structure whose individual elements are able to differ

What is buddy systems, Buddy systems : A method of handling the storage man...

Buddy systems : A method of handling the storage management problem is kept individual free lists for blocks of dissimilar sizes. Every list having free blocks of only one particul

Calculate the area and circumference of a circle , Write a program which in...

Write a program which incorporates a function named compute and which is used to calculate the area and circumference of a circle. Use the main function for inputs and outputs.

Specifying and working rules of a class, Specifying a Class: As discuss...

Specifying a Class: As discussed a class is defined to develop an algorithm and bind it together in a core shell. A class is an abstract data type (ADT).  The binding of dat

Define procedure that take argument or return integral value, Simpson's Rul...

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim

Padovan string, #questio#A Padovan string P(n) for a natural number n is de...

#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string

Random searching, write aprogram for random -search to implement if a[i]=x;...

write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd