anonymous
  • anonymous
what does static array means in c programming????
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
In the context of C, the keyword "static" means that the value of a variable/pointer is saved from deletion in certain instances. Static arrays are a kind of static variable, and are set to null when declared (see http://stackoverflow.com/questions/553213/c-static-array). Example of a static var inside a function: By declaring a static variable (let's say it's an int and declared "int mystaticvar") inside a function, I can call the function multiple times and each time the value of mystaticvar would be whatever it was at the end of the previous call. Example: -I call the function myFunc() and inside it the variable mystaticvar is declared to be 0. myFunc then sets the value of mystaticvar to 1. myFunc() returns, and all other non-static vars are eliminated. -I call myFunc again, and now mystaticvar's value is 1 before I do anything with it! Hope this helps!
anonymous
  • anonymous
thank you..^^
anonymous
  • anonymous
but it says static.. i thought it means by constant.. so the value still change???

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
The true meaning/purpose of the keywords in C or C-like languages greatly differ from their English meaning :-D
anonymous
  • anonymous
Static in this case means that the variable retains definition and declaration even when it's scope is released. Calls can still be made to change the value of the variable. It isn't lost when the scope concludes. Constant implies the value never changes.
anonymous
  • anonymous
@benjica scope???
anonymous
  • anonymous
static does not need to be instantiated.

Looking for something else?

Not the answer you are looking for? Search for more explanations.