Total members 9950 | Gratitudes |It is currently Sat Feb 11, 2012 3:18 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: Types of Pointers in C++
PostPosted: Fri Nov 07, 2008 12:25 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time

Pointers Varieties
********************************************************************************\
*****************

(1)
Code:
int *p;

// p is a pointer to an integer quantity

(2)
Code:
int *p[10];

// p is a 10-element array of pointers to integer quantities

(3)
Code:
int (*p)[10];

// p is a pointer to a 10-element integer array

(4)
Code:
int *p(void);

// p is a function that returns a pointer to an integer quantity

(5)
Code:
int p(char *a);

// p is a function that accepts an argument which is a pointer to a
character returns an
// integer quantity

(6)
Code:
int *p(char *a);

// p is a function that accepts an argument which is a pointer to a
character returns a
// pointer to an integer quantity

(7)
Code:
int (*p)(char *a);

// p is pointer to a function that accepts an argument which is a pointer to
a character
// returns an integer quantity

(8)
Code:
int (*p(char *a))[10];

// p is a function that accepts an argument which is a pointer to a
character returns a
// pointer to a 10-element integer array

(9)
Code:
int p(char (*a)[]);

// p is a function that accepts an argument which is a pointer to a
character array returns
// an integer quantity

(10)
Code:
int p(char *a[]);

// p is a function that accepts an argument which is a array of pointers to
characters
// returns an integer quantity

(11)
Code:
int *p(char a[]);

// p is a function that accepts an argument which is a character array
returns a pointer to
// to an integer quantity

(12)
Code:
int *p(char (*a)[]);

// p is a function that accepts an argument which is a pointer to a
character array returns a
// pointer to an integer quantity

(13)
Code:
int *p(char *a[]);

// p is a function that accepts an argument which is an array of pointers to
characters
// returns a pointer to an integer quantity

(14)
Code:
int (*p)(char (*a)[]);

// p is pointer to a function that accepts an argument which is a pointer to
a character array
// returns an integer quantity

(15)
Code:
int *(*p)(char (*a)[]);

// p is pointer to a function that accepts an argument which is a pointer to
a character array
// returns a pointer to an integer quantity

(16)
Code:
int *(*p)(char *a[]);

// p is pointer to a function that accepts an argument which is a array of
pointers to
// characters returns a pointer to an integer quantity

(17)
Code:
int (*p[10])(void);

// p is 10-element array of pointers to functions; each function returns an
integer quantity

(18)
Code:
int (*p[10])(char a);

// p is 10-element array of pointers to functions; each function accepts an
argument which is
// a character and returns an integer quantity

(19)
Code:
int *(*p[10])(char a);

// p is 10-element array of pointers to functions; each function accepts an
argument which is
// a character and returns a pointer to an integer quantity

(20)
Code:
int *(*p[10])(char *a);

// p is 10-element array of pointers to functions; each function accepts an
argument which is
// a pointer to a character and returns a pointer to an integer quantity

:wink:

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 temperature transformer between different types  JavaScript examples  msi_333  0
 What are the types of jdbc drivers.?  C-C++  muralidhar  2
 lesson9: XSD Complex Types Indicators  XSD Tutorials  msi_333  0
 java data types  Java  msi_333  0
 Arrays using Pointers  C++ examples  mileloader  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team