Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Programming / Difference Between Integer and Pointer

Difference Between Integer and Pointer

January 15, 2011 Posted by Andrew

Integer vs Pointer

The terms integer and pointer are used in most of the programming languages. In computer programming languages, integer is referred as any data type that represents a subset of mathematical integers whereas pointers are defined as a type whose value points to or refers directly to another value that is stored somewhere else in computer’s memory using the address of the value.

Integer

In computer programming languages, an integer is a data type that represents subset of mathematical integers. The value of datum that has an integral part is the mathematical integer to which it corresponds. The value is stored in the memory of computer in this way by representing the datum. The integral types can be signed or unsigned. Signed means they can represent negative integers and unsigned mean they can represent non-negative integers.

A string of bits is the most common way of representing a positive integer. This is done by using the binary numeral system. There is a variation in the order of bits. The precision or width of an integer type represents the number of bits.

In binary numeral system, the negative numbers can be represented by three ways. This can be done by one’s complement, two’s complement or sign-magnitude. However, there is another method to represent integers and it is called binary-coded decimal. But this method is rarely used these days.

Different integral types are supported by different CPUs. Both signed as well as unsigned types are supported by different hardware but there are some fixed width sets.

Pointer

In computer programming language, a pointer is defined as the data type whose value points to or directly refers to another value that is stored somewhere else in the memory of the computer. Pointers takes place of general purpose registers in case of high level languages whereas in low level language such as machine code or assembly language, it is done in available memory. A location in the memory is referenced by the pointer. A pointer can also be defined a less subtracted or simple implementation of more abstracted data type. Pointers are supported by different programming languages but there are some restrictions on the use of pointers in some languages.

Performance can be improved significantly in case of repetitive operations such as lookup tables, tree structures, strings and control tables. In procedural programming, pointers are also used in holding addresses of entry points. However, in object oriented programming, pointers are used to bind methods in functions.

Although pointers are being used to address the references but they can be applied more properly to data structures. There are certain risks that are associated with pointers because they allow protected as well as unprotected access to memory addresses of the computer.

Related posts:

Difference between Java and J2EE Difference Between C and C++ Difference Between Objects and Classes Difference Between JSP and Servlets Difference Between Apple iOS 4.2 and Apple iOS 4.3 Beta

Filed Under: Programming, V1 Tagged With: binary numeral system, Integer, Pointer, Programming, Programming languages, signed integer, unsigned integer

About the Author: Andrew

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between Fish and Mammals

Difference Between Physical Therapy and Occupational Therapy

Difference Between Physical Therapy and Occupational Therapy

Difference Between Rate Zonal and Isopycnic Centrifugation

Difference Between Rate Zonal and Isopycnic Centrifugation

Difference Between Rhizoids and Rhizomes

Difference Between Rhizoids and Rhizomes

Difference Between Investment and Merchant Banking

Latest Posts

  • What is the Difference Between Syphilis and HIV
  • What is the Difference Between Gel Filtration and Affinity Chromatography
  • What is the Difference Between Antibiotic and Antiseptic and Disinfectant
  • What is the Difference Viral Pneumonia and Bacterial Pneumonia
  • What is the Difference Between Cleaning and Disinfecting
  • What is the Difference Between Cirrhosis and Liver Failure
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.