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...

If I want to initialize the array like.
int a[5] = {0};
then it gives me all element 0.
but if i give int a[5] = {5};
then 5 0 0 0 0 is ans.
what will I do for all element 5 5 5 5 5 in a single
statement???

Answer Posted / jahid

int a[5]={5,5,5,5,5}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you use the functions fseek(), freed(), fwrite() and ftell()?

1161


What is a dynamic array in c?

1153


What is file in c language?

1001


What is data structure in c programming?

1075


What are variables and it what way is it different from constants?

1238


State the difference between x3 and x[3].

1112


Explain what are the different file extensions involved when programming in c?

1107


How can I convert a number to a string?

1171


What is the use of pragma in embedded c?

1051


What is difference between scanf and gets?

1263


What do you mean by scope of a variable in c?

1010


What is array of pointers to string?

1063


What are header files? What are their uses?

1205


What is the difference between declaring a variable and defining a variable?

1270


What is nested structure with example?

1070