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 / n

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

Is This Answer Correct ?    27 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a conditional inclusion statement in C?

1067


What is #define?

1119


what is stack , heap ,code segment,and data segment

2700


How do I use void main?

1091


Is boolean a datatype in c?

1069


What is a good way to implement complex numbers in c?

1053


Do array subscripts always start with zero?

1304


Explain what is the difference between the expression '++a' and 'a++'?

1214


How does pointer work in c?

1126


Explain what is the benefit of using #define to declare a constant?

1194


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2255


Here is a good puzzle: how do you write a program which produces its own source code as output?

1105


Is using exit() the same as using return?

1362


Why does everyone say not to use scanf? What should I use instead?

1423


What is c language and why we use it?

1077