Explain the pointer types, C/C++ Programming

Pointer Types

Pointer holds the address of an object, permitting for the indirect manipulation of that object. They are used in creating linked data structures like lists, trees and management of objects that are dynamically formed during program execution.

  • Pointers are declared using the (*) operator. The general format is:

 type   *ptrname;

type can be of any data type and pointer name becomes the pointer of that data type.

e.g.

int    *iptr;

 char   *cptr;

float   *fptr;

The pointer iptr kept the address of an integer. In other words it points to an integer, cptr to a character and fptr to a float value

 

Posted Date: 6/28/2013 1:49:15 AM | Location : United States







Related Discussions:- Explain the pointer types, Assignment Help, Ask Question on Explain the pointer types, Get Answer, Expert's Help, Explain the pointer types Discussions

Write discussion on Explain the pointer types
Your posts are moderated
Related Questions
What if one forget the [] when deleteing array allocated through new T[n]? A: All life comes to a disastrous end. It is the programmer's responsibility not the compiler's to

manupulates operator precidence

Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid

Aim: To implement a program to convert distance given in feet and inches into meters and centimeters and vice versa. Code:                         class mcm; class

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

where to use tower of honoi?

t a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these

Structure of C++ Program: Chronological order of C++ program. 1.   Class declaration 2.   Main function program 3.   Member functions definitions 4.   Include heade

A: Here are a few of the many instance of operator overloading: myString + yourString may concatenate two std::string objects myDate++ may increment a Date object a * b may m

The #define Directive The #define directive explains a macro which is a text string represented by a name. Whenever the pre-processor finds this name in the program, it is repl