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

Write code for initializing one dimentional and two
dimentional array in a C Program?

Answer Posted / shruti

Ans no. 4 is correct..

incase u have to initialise an array have more number of
elements as i 100 or 200..

eg..

int a[50];
then u can use following functions:

**YOU CAN INITIALISE IT TO A PARTICULAR VALUE ONLY USING
THE BELOW CODE..

int a[50];
int i;

for (i = 0 ; i < 50 ; i++)
{
a[i] = 0;
}

similarly for 2D

for(i = 0 ; i < 50 ; i++)
{
for(j = 0 ; j < 50 ; j++)
{
a[i][j] = 0;
}
}

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main characteristics of c language describe the structure of ac program?

1170


What is the purpose of scanf() and printf() functions?

1192


Which type of language is c?

1036


What is a scope resolution operator in c?

1222


What are the features of c language?

1034


What is structure data type in c?

991


Explain what does the function toupper() do?

1023


List the variables are used for writing doubly linked list program.

1980


How can you increase the allowable number of simultaneously open files?

1104


Explain what are multidimensional arrays?

1019


What standard functions are available to manipulate strings?

1102


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1343


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

1029


What is actual argument?

1019


List some basic data types in c?

989