Friday, 1 September 2017

CONSTANT EXPRESSION REQUIRED-ERROR IN C PROGRAMMING

CONSTANT EXPRESSION REQUIRED-ERROR IN C PROGRAMMING 




The above program has error 'constant expression required' that means in between the [ ] constant yielding expression is needed or constant of type integer is needed.
While declaring an array the compiler must know how much memory will be reserved for how many elements of the array. So in C language at the time of declaration of an array we must provide a meaningful size of the array and the number of elements of any array can not be non- integral.
The size of the array must be integer because the number of elements can not be in fraction they can only be in integral numbers and cant be float or double.
               On the other context ,if we want to give the size of the array at the time of execution then we have to deal with a concept known as dynamic memory allocation and we need to use some predefined functions as calloc() ,malloc() and realloc().

WhatsApp will give Rs 1.8 crores to new Indian startups, Here is all you need to know

The "Startup India WhatsApp Grand Challenge" has been appraise growth in the entrepreneurial sector. Total prize money of Rs 1.8...