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
how to capitalise first letter of each word in a given string?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is c language used for?
Write a program to check palindrome number in c programming?
What is d'n in c?
What are reserved words?
What does the c in ctime mean?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What is variables in c?
What is the significance of an algorithm to C programming?
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me
Why static is used in c?
What do you mean by a sequential access file?
Why is C language being considered a middle level language?