The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
restricted pointers carl.alv High Level Programming 0 02-29-2008 11:34 PM
pointers Milla High Level Programming 2 11-03-2007 05:13 AM
Pointers and array dianazheng High Level Programming 2 11-04-2004 07:49 PM
Regarding Function and Pointers. S.Vishwanath High Level Programming 0 05-25-2004 09:15 AM
Pointers to Arrays Jayathirtha High Level Programming 2 09-05-2001 04:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-05-2006
areef4u areef4u is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 27
pointers

is this a valid c declaration

int (*ptr(int *b))[5];

plz explain...
  #2 (permalink)  
Old 08-05-2006
Hitori's Avatar
Hitori Hitori is offline Forum Advisor  
Registered User
  
 

Join Date: Jun 2006
Posts: 360
valid,
this is a declaration of function with argument int* that returns pointer to an array of int*:

int (*ptr(int *b))[5];
int i;
int (*pi)[5] = ptr(&i);
i = *pi[0];
  #3 (permalink)  
Old 08-05-2006
nathan nathan is offline VIP Member  
Supporter
  
 

Join Date: Jul 2006
Posts: 156
Why do you ask if this is valid? A simple compile would have shown whether it is valid or not. This looks like homework. This is against rule #6.

Quote:
(6) Do not post classroom or homework problems.
And please follow rule number 9 as well:
Quote:
(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.
"please" is only 3 more characters than "plz".
  #4 (permalink)  
Old 08-05-2006
Hitori's Avatar
Hitori Hitori is offline Forum Advisor  
Registered User
  
 

Join Date: Jun 2006
Posts: 360
Quote:
Originally Posted by nathan
Why do you ask if this is valid? A simple compile would have shown whether it is valid or not. This looks like homework. This is against rule #6.



And please follow rule number 9 as well:


"please" is only 3 more characters than "plz".
Hey, don't frighten people. Simple question, simple answer. What a problem?
  #5 (permalink)  
Old 08-05-2006
nathan nathan is offline VIP Member  
Supporter
  
 

Join Date: Jul 2006
Posts: 156
The problem, Hitori, is that it is obviously evident that no effort was put into this question.

Every one of these posts by areef4u has either been closed, or if not closed, areef4u has been warned not to post homework questions.

sparse files
Unix
bitwise operators
testing
memory addresses
pseudo driver
Linux
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0