Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-01-2003, 12:57 AM   #1
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Rep: Reputation: 15
Thumbs up program size question

Which of the following code will result in max. exe size, or to be more appropriate, which of the following codes will occupy greates and least memories when running:

(1) int arr[100];

(2) main()
int arr[100];

(3) main()
static in arr[100];

I think that at least (1) and (3) should require same memory on runtime beacuse in both cases the varilable are stored on the Data Segment. But which is greatest and least, or will all of them require same amount of memory?


Old 05-01-2003, 03:52 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I suggest you try it? :)



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
Size Question and how to Rick Harvey Linux - Newbie 13 10-30-2005 02:16 PM
Program to print the size of a web file justintime32 Linux - Software 1 06-18-2005 03:19 PM
My First Question - Screen Size oKubricko Linux - Newbie 5 07-29-2004 01:22 PM
partition size question? Lleb_KCir Linux - General 2 05-23-2004 09:21 AM
question about inode size PTBmilo Linux - General 2 03-02-2003 02:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:15 PM.

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