c doubt



hi,
i tried with this simple code
int array[],i;
for(i=-1;i<=sizeof(array);i++)


but the condition is failing always even array size is greater than
zero.
can u help me.............

.



Relevant Pages

  • Re: Safest way to convert chars to ints
    ... Having allocated an array like this, you should ideally dispose of it. ... I don't see that it is really necessary to set each element to zero the ... 'i' an 'int' for sscanf to work properly. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: array of zero elements
    ... we allocate array of zero elements. ... int buf; ...
    (microsoft.public.vc.language)
  • Re: question about data movement
    ... positions were previously initialized to zero, ... The obvious answer is to reverse the "sense" of your array so rather ... Messing with your loop counter inside the loop body is one. ... int current = new_value; ...
    (rec.games.roguelike.development)
  • Re: array intialization for primitives
    ... void dumbMethod (int i) { ... Run-time Evaluation of Array Creation Expressions ... For type short, the default value is zero, that is, the value of 0. ... For type double, the default value is positive zero, that is, 0.0d. ...
    (comp.lang.java.programmer)
  • Re: c doubt
    ... int array,i; ... but the condition is failing always even array size is greater than ... zero. ...
    (comp.lang.c)