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

How can I do graphics in c?

1035


Write program to remove duplicate in an array?

1084


Can you please explain the difference between exit() and _exit() function?

1033


When is a void pointer used?

1242


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1254


write a c program in such a way that if we enter the today date the output should be next day's date.

2196


Explain built-in function?

1142


can any one provide me the notes of data structure for ignou cs-62 paper

2177


What is pass by reference in c?

1188


Write a program to swap two numbers without using a temporary variable?

1128


What are the types of functions in c?

989


What does != Mean in c?

1055


What is this infamous null pointer, anyway?

1061


What is the best way of making my program efficient?

1040


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1090