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



IS it possible to define a zero sized array in c.if it is possible how can the elements of that arr..

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

IS it possible to define a zero sized array in c.if it is possible how can the elements of that arr..

Answer / crazzybouy

#include<stdio.h>

int main(){
int a[0];
printf("%d",sizeof(a));
}
~

Is This Answer Correct ?    10 Yes 11 No

IS it possible to define a zero sized array in c.if it is possible how can the elements of that arr..

Answer / palani222samy

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

IS it possible to define a zero sized array in c.if it is possible how can the elements of that arr..

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

IS it possible to define a zero sized array in c.if it is possible how can the elements of that arr..

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

Post New Answer

More C Interview Questions

program to get the remainder and quotant of given two numbers with out using % and / operators?

10 Answers   College School Exams Tests, IBM,


main() { int i; printf("%d",((i=1)*i-- - --i*(i=-3)*i++ + ++i)); } ans is 24 bt how?pls tell smbody............

3 Answers  


Differentiate between the = symbol and == symbol?

0 Answers  


In c language can we compile a program without main() function?

0 Answers  


#define d 10+10 main() { printf("%d",d*d); }

6 Answers  


simple program of graphics and thier outpu display with a want what is out put of graohics in c language

1 Answers   CSC, HCL,


Is c is a high level language?

0 Answers  


Is exit(status) truly equivalent to returning the same status from main?

0 Answers  


What is wrong with this code such that it doesnt produce the input reversed? #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char Space = ' '; char LineOfText; float count; LineOfText = getchar(); while ((LineOfText = getchar()) != '/n'); { count = strlen(LineOfText) - 1; while (count >= 0) { putchar(LineOfText[count]); count--; } } getchar(); return 0; }

2 Answers  


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


What is the purpose of sprintf() function?

0 Answers  


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


Categories