Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables

2 Answers   TCS,


why do some people write if(0 == x) instead of if(x == 0)?

0 Answers  


When is a void pointer used?

0 Answers  


print out of string in this format; 1. "rajesh" 2. \n 3. %d

5 Answers   mpower,


what is the difference between char * const and const char *?

2 Answers   TCS,


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

0 Answers  


Is main an identifier in c?

0 Answers  


What do you understand by friend-functions? How are they used?

0 Answers   iNautix,


what are the interview question's in the language c

2 Answers   Nipuna,


What is far pointer in c?

0 Answers  


write a program to read a number and print in words that is in sentence for example 21,219 then output is "twenty one thousand and two hundred nineteen" by using only control flow statements (only loops and switch case )?

1 Answers   TCS,


how to implement stack operation using singly linked list

2 Answers  


Categories