I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.
I could swear I
#include int main(){ int i,a[50]; for (i=0;i<50;i++){ a[i]=5;// set value 5 to all the array index } for (i=0;i<50;i++) printf("%d\n",a[i]); return 0; }
It will give the o/p 5 5 5 5 5 5 ...... till the size of whole array