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 / litan parida

int a[1000];
memset(&a,0,sizeof(a))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

2277


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1108


What are comments and how do you insert it in a C program?

1198


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2401


Is there anything like an ifdef for typedefs?

1094


How can you pass an array to a function by value?

1057


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1898


Implement bit Array in C.

1096


What functions are used in dynamic memory allocation in c?

1017


please explain every phase in the "SDLC" in the dotnet.

2560


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

1071


is it possible to create your own header files?

1045


Which of these functions is safer to use : fgets(), gets()? Why?

1044


What is the sizeof () operator?

1017


What is the difference between int main and void main in c?

1092