IS it possible to define a zero sized array in c.if it is
possible how can the elements of that array can be
accessed.array index starts from zero,if it is possible to
define zero sized array how can be its first element can be
accesseed.
Answers were Sorted based on User's Feedback
Answer / k satish kumar reddy
it is not possible to define a zero size array in C. Because
we must declare the size of the array at the time of
declaration. If we declare zero size array like array[0] the
compiler shows an error.
| Is This Answer Correct ? | 15 Yes | 6 No |
Answer / crazzybouy
#include<stdio.h>
int main(){
int a[0];
printf("%d",sizeof(a));
}
~
| Is This Answer Correct ? | 10 Yes | 11 No |
ya it's possible to assign , elements can be access an the
store value, this value can be store as an the address so
easily we can find that value, first element can be assigned
as example c[0]=0,
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / slowdeath
no, it is not possible to define a array with 0 element,
the compiler will show an error message that array must
contain atleast one element
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / avtar singh
no it is not possible to define array with size 0 as
compiler shows a compilation error of array must contain
atleast one element;
| Is This Answer Correct ? | 0 Yes | 5 No |
I want tcs placement papers of 2004-2009 , its urgent
How can I allocate arrays or structures bigger than 64K?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
here is a link to download Let_Us_C_-_Yashwant_Kanetkar
Explain how do you list a file’s date and time?
When is a void pointer used?
What is difference between Structure and Unions?
Where register variables are stored in c?
What is character constants?
write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4
What is meant by high-order and low-order bytes?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.