Search the web
Sign In
New User? Sign Up
c4swimmers · India's First C/C++ Programming Portal
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
File - Types of Pointers.txt   Topic List   < Prev Topic  |  Next Topic >
Reply | Forward  | 
File - Types of Pointers.txt


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

(1) int *p;
// p is a pointer to an integer quantity

(2) int *p[10];
// p is a 10-element array of pointers to integer quantities

(3) int (*p)[10];
// p is a pointer to a 10-element integer array

(4) int *p(void);
// p is a function that returns a pointer to an integer quantity

(5) int p(char *a);
// p is a function that accepts an argument which is a pointer to a
character returns an
// integer quantity

(6) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) int (*p[10])(void);
// p is 10-element array of pointers to functions; each function returns an
integer quantity

(18) 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) 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) 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











Wed Jul 1, 2009 8:21 am

c4swimmers@yahoogroups.com
Send Email Send Email

Forward
 | 
Expand Messages Author Sort by Date

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Jun 1, 2009
8:18 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Jul 1, 2009
8:23 am

Hi I have a piece of code, which crashes , can any one let me know what is that I am doing wrong here? int temp() { void **dummy= NULL; dummy[0] = malloc(4); ...
kishore kumar
bodkekumar@...
Send Email
Sep 4, 2009
4:46 pm

Hi, You have to first allocate the memory for the array where you are planning to store the pointers. then allocate the the other pointers. This way: int...
srinivas g
srini_g2003
Offline Send Email
Sep 10, 2009
6:36 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Aug 1, 2009
8:19 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Sep 1, 2009
8:22 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Oct 1, 2009
8:21 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Nov 1, 2009
8:21 am

Pointers Varieties ************************************************************************************************* (1) int *p; // p is a pointer to an...
c4swimmers@yahoogroup...
Send Email
Dec 1, 2009
9:20 am
 First  |  |  Next > Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help