recategorized by
3,835 views

1 Answer

0 votes
0 votes
yes array follows static memory allocation means the size equal to the size of array is statically allocated in the memory before accessing it. Uninitialized  array gives garbage value at runtime because it follows the local variable concept when we declare array inside the function.when static specifier is used for array or array is declare outside the function  then it will give 0 at run time(partially initialized array).

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
radha gogia asked Jul 28, 2015
980 views
int * p(void) { int *x; *x=10; return (x); } We create *x, and dereference it before assigning anything to it (x). Most likely, when we are declaring something on the sta...
1 votes
1 votes
1 answer
3
radha gogia asked Jul 29, 2015
677 views
#include<stdio.h int main(){ int test=0; float a = 3424.34; printf("hello \n %d",(test? a: 3)); return 0; }It is giving output as hello 0 ,I am unable to understand the l...
0 votes
0 votes
1 answer
4
ManojK asked Apr 5, 2016
562 views
Why C language does not provide heap or garbage collection ?? Is there any higher level mechanism??