LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 04-27-2007, 11:02 AM   #1
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Rep: Reputation: 15
Values like VARIABLE[i] ?


Hello,

I would like to know what does the following syntax:

Code:
VARIABLE[2]=...

or

i = 2
VARIABLE[i]=...
I don't really understand for now...

I'm still a newbie in C programming...
Did not read any instructions, b/c I cant even find the name of this...

Ive heard it was sort of "tables", very near of "pointers" in C.

What are these tables?

Thank you.

BlueSpirit
 
Old 04-27-2007, 11:57 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
it's an array.
 
Old 04-27-2007, 12:48 PM   #3
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Original Poster
Rep: Reputation: 15
continue... its interesting.

What is an array's utility?
 
Old 04-27-2007, 01:19 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
sorry, i'm not realy up for repeating what you could already have googled for...
 
Old 04-27-2007, 01:49 PM   #5
slzckboy
Member
 
Registered: May 2005
Location: uk - Reading
Distribution: slack 10.2 kde 3.4.2 kernel 2.6.15
Posts: 452

Rep: Reputation: 30
If your serious about learning C take some time to learn about the basic data types.
If you understand the info below you will be on your way.

http://home.netcom.com/~tjensen/ptr/ch2x.htm


google is your friend.

You will find people more willing to help if it looks lie you have put in effort first.
Hope this helps.

good luck.
 
Old 04-27-2007, 02:35 PM   #6
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Original Poster
Rep: Reputation: 15
ok ok...

gonna study this 1st. im just lazy today [no skool!]...

Edit:
As I read, it is often used to coordinate things in the memory...
To keep the order of integers.

Hmmm. I love this science.

Last edited by BlueSpirit; 04-27-2007 at 02:38 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to share variable values between shell and awk? realos Programming 1 12-16-2006 11:15 PM
setting a variable variable in a script... this works, but could it be more elegant? pwc101 Programming 3 08-18-2006 12:23 PM
Scripting: accessing a variable stored in a variable? tomolesonjr Linux - Newbie 5 05-05-2006 09:47 PM
BASH Script: variable values referencing for console arguments sadarax Programming 1 11-14-2005 06:23 PM
bash - comparing a variable to several values davee Programming 3 05-05-2003 08:26 AM


All times are GMT -5. The time now is 05:20 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration