Function Pointer

2 views
Skip to first unread message

Ravina

unread,
Aug 15, 2010, 10:23:24 AM8/15/10
to Knowledge Test
wht these mean for :-

1. int ( *ptr1)( );

2. int ( *ptr2)( char *,char * );

3. void (*ptr3 )( );

4.char (* (* ptr4( )) [ ]) ( );

5.int ( * ( * ptr5 )( ) )[3][4];

6. int ( * ( * ( *ptr6)( )) [10] )( );

7. char ( * (*ptr7 [3] )( ) [10];

8. float * (* ( * ( *ptr8 ) ( ) )[10] )( );


some of these are very simple and some are complex but helpful to
understand functiopn pointer easily.
If any one think that all of these are very simple for him/her then
give chance to other for trying and post ur answer after two days

Ravina soni

unread,
Aug 19, 2010, 1:53:55 PM8/19/10
to Knowledge Test


no answer .......no one even want to try .......

arundyuti mishra

unread,
Aug 20, 2010, 5:49:12 AM8/20/10
to knowledge-...@googlegroups.com
sahi hai.ab main akele  kab tak sab try karu..lolzzzzzzz a big joke i guess..............

neha mungee

unread,
Aug 20, 2010, 9:40:00 AM8/20/10
to Knowledge Test
1. ptr1 is a pointer to a function that returns an int
2.ptr2 is a pointer to a function that accepts 2 char pointers and
returns an int.
3.ptr3 is a pointer to a function that accepts no arguments and
returns nothing
4.we know that "return type pointer[arraysize]" means pointer to an
array. ptr4 ia pointer to an array of pointers pointing to a function
that accepts nothing and returns char.
5.(*ptr5)() means pointer to a function and int(*p)[3][4] means
pointer to a 2d array. ptr5 is a pointer to a function that returns a
pointer to a 2d array with 3 rows and 4 coloumns.
6.ptr 6 is a pointer to function that returns pointer to an array of
pointers to function that return integer.
7.ptr7 is an array of pointers to a function that returns pointer to
char array
8.ptr8 is pointer to a function which returns a pointer that points to
an array of pointer to funtions that return float pointer.

Ravina soni

unread,
Aug 20, 2010, 1:52:13 PM8/20/10
to knowledge-...@googlegroups.com

@neha nice explanation ..........
Reply all
Reply to author
Forward
0 new messages