Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-29-2016, 04:37 AM   #1
chinmay.sahoo
Registered User
 
Join Date: Dec 2013
Location: Banglore
Posts: 329
Send a message via AIM to chinmay.sahoo Send a message via MSN to chinmay.sahoo
What Are Pointers?

A pointer is a variable that contains a memory address. Very often this address is the location of another variable. For example, if x contains the address of y, then x is said to "point to" y.

Pointer variables must be declared as such. The general form of a pointer variable declaration is

Code:
type *var-name;
Here, type is the pointer’s base type; it must be a valid C++ type. var-name is the name of the pointer variable. For example, to declare p to be a pointer to an integer, use this declaration:

Code:
int *p;
For a float pointer, use
float *p;
In general, in a declaration statement, preceding a variable name with an * causes that variable to become a pointer. The type of data that a pointer will point to is determined by its base type. Here is an example:

Code:
int *ip; // pointer to integers
double *dp; // pointer to doubles
As the comments indicate, ip is a pointer to integers because its base type is int, and dp is a pointer to doubles because its base type is double. As you will see, the base type is very important in pointer operations.



Hair Building Fiber
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
chinmay.sahoo is offline   Reply With Quote

Old 10-03-2016, 01:56 AM   #2
Manishkumar12
Registered User
 
Join Date: Dec 2015
Posts: 136
Looks like you have copied whole page, and just pasting here.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Manishkumar12 is offline   Reply With Quote
Old 10-18-2016, 03:13 AM   #3
elenajayden
Registered User
 
Join Date: Jul 2016
Posts: 27
Pointers are variables that hold address of another variable of same data type.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
elenajayden is offline   Reply With Quote
Old 10-19-2016, 01:54 AM   #4
citsweb
Registered User
 
Join Date: Oct 2016
Posts: 50
Nice post,It is useful information to every one..Thank you!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
citsweb is offline   Reply With Quote
Old 10-27-2016, 12:32 AM   #5
redspiderae
Registered User
 
Join Date: Aug 2016
Posts: 11
A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address.
redspiderae is offline   Reply With Quote
Old 11-03-2016, 10:46 PM   #6
StuartSpindlow1
Registered User
 
Join Date: Jun 2014
Location: United Kingdom
Posts: 127
Pointers are used in C program to access the memory and manipulate the address.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
StuartSpindlow1 is offline   Reply With Quote
Old 11-22-2016, 11:31 PM   #7
Aman897
Registered User
 
Join Date: Jul 2015
Posts: 145
The term "pointer" is strongly associated with the C/C++ concept of pointers, which are variables which explicitly store memory addresses, and which can be modified arithmetically to point to any arbitrary address. In Java, pointers exist, but not as a first-class language concept.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Aman897 is offline   Reply With Quote
Old 12-07-2016, 01:54 AM   #8
JennyBrighton
Registered User
 
Join Date: Sep 2016
Posts: 23
A pointer is a variable which contains the address in memory of another variable.
JennyBrighton is offline   Reply With Quote
Old 12-09-2016, 03:38 AM   #9
mykarvachauth
Registered User
 
Join Date: Sep 2016
Posts: 25
A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
mykarvachauth is offline   Reply With Quote
Old 12-18-2016, 10:54 PM   #10
wiliamjamesh
Registered User
 
Join Date: Sep 2016
Posts: 257
A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wiliamjamesh is offline   Reply With Quote
Old 12-26-2016, 02:01 AM   #11
Carolmelissa
Registered User
 
Join Date: Nov 2016
Posts: 100
A pointer is a variable that contains a memory address. All the time this address is the area of another variable. For instance, if x contains the address of y, then x is said to "indicate" y.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Carolmelissa is offline   Reply With Quote
Old 01-09-2017, 11:12 PM   #12
williyamjam
Registered User
 
Join Date: Nov 2016
Posts: 128
A pointer is a programming language object, whose value refers to (or "points to") another value stored elsewhere in the computer memory using its memory address. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
williyamjam is offline   Reply With Quote
Old 03-14-2017, 10:55 PM   #13
pxljobs
Registered User
 
Join Date: Jul 2016
Location: Bangalore
Posts: 365
This is an variable which contains address in memory of another variable...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pxljobs is offline   Reply With Quote
Old 03-14-2017, 11:50 PM   #14
sin123
Registered User
 
Join Date: Jan 2017
Posts: 671
nice post.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
sin123 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is a smart pointer? chinmay.sahoo Programming General 0 02-15-2016 01:45 AM


All times are GMT -7. The time now is 05:21 AM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.