LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-21-2012, 05:30 AM   #16
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869

Let me repeat: an array as formal parameter means pointer, so the following declarations are equivalents:

Code:
void foobar (int (*arr)[4]);
void foobar (int arr[2][4]);
void foobar (int arr[][4]);
 
Old 07-21-2012, 06:25 AM   #17
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by NevemTeve View Post
Let me repeat: an array as formal parameter means pointer, so the following declarations are equivalents:

Code:
void foobar (int (*arr)[4]);
void foobar (int arr[2][4]);
void foobar (int arr[][4]);

support what NevemTeve said above.

: )
 
Old 07-23-2012, 12:23 AM   #18
kauuttt
Member
 
Registered: Dec 2008
Location: Atlanta, GA, USA
Distribution: Ubuntu
Posts: 135

Rep: Reputation: 26
I second gchen's last 2-3 posts.
Anyway, I think, it will be good if you go through the "arrays and pointer" chapter in any standard C book. I will suggest - Kernighan and Ritchie.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
single 8K process stack vs 4K process stack and a seperate 4K interrupt stack charvak Linux - Kernel 1 03-17-2010 06:58 PM
frame-by-frame editing for dv home movie marcia Linux - Software 3 03-05-2009 10:32 PM
html frame related question kpachopoulos Programming 1 06-19-2006 03:43 PM
calling a frame from another frame : JAVA randomx Programming 0 10-07-2004 02:49 PM
pthreads stack frame lock up detection flakjacket Linux - General 0 06-26-2004 11:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration