Re: why do the following crash



On Mar 31, 8:56 am, Richard <de...@xxxxxxxxx> wrote:
Philip Potter <p...@xxxxxxxxxxxx> writes:
parag_p...@xxxxxxxxxxx wrote:
File1.c

int arr[80];

File2.c

extern int *arr;
int main()
{
arr[1] = 100;
return 0;
}

Did you read the FAQ? You have just asked question 6.1, and if you go
tohttp://c-faq.com/you will get your answer.

Philip

Will you be replying to every question here with a pointer to the FAQ?

Why shouldn't he, if the question really is a FAQ?


If so possibly you would like to just automate your replies?

Are you offering to do it? While the scope of the problem is more
limited, the problem of interpreting human language automatically
appears to be intractable.

Hint : not every programmer that comes here can memorise the entire FAQ
nor can they always find the necessary section of the FAQ.

The FAQ is a nice reference. No one is expected to memorize it but it
would do good to read it once in a while. (I think I am due for a
refresher.)
Ed
.



Relevant Pages

  • Re: why do the following crash
    ... Will you be replying to every question here with a pointer to the FAQ? ... the problem of interpreting human language automatically ... not every programmer that comes here can memorise the entire FAQ ...
    (comp.lang.c)
  • Re: Really **wonderful** website for C interview questions!!!!!
    ... > then you should take a look at the C FAQ by Steve Summit... ... to return a string from a function"), and compare FAQ 7.5b. ... ("What is a NULL pointer? ... Or see pages/7_6.html ("How to declare an array of N pointers to ...
    (comp.lang.c)
  • Re: working with addresses
    ... The URL to the C FAQ has been in my sig block for years. ... what the FAQ emphasises is that those who seek to write portable code ... reason for it, and I guessed that speed might be your reason. ... likely to make for further imbalances in pointer sizes. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: help alleaviate inheritance design confusion
    ... > within the bounds of Liskov Substitution Principle. ... > the base pointer to a derived object to garner access to the derived ... a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Hungarian notation in C++ (is it used or not today, and if so, how?)
    ... > p (pointer) ... > by (unsigned char, or byte) ... that the prefix is correct. ... C++ Faq: http://www.parashift.com/c++-faq-lite ...
    (alt.comp.lang.learn.c-cpp)