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
What is the use of a conditional inclusion statement in C?
What is #define?
what is stack , heap ,code segment,and data segment
How do I use void main?
Is boolean a datatype in c?
What is a good way to implement complex numbers in c?
Do array subscripts always start with zero?
Explain what is the difference between the expression '++a' and 'a++'?
How does pointer work in c?
Explain what is the benefit of using #define to declare a constant?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Here is a good puzzle: how do you write a program which produces its own source code as output?
Is using exit() the same as using return?
Why does everyone say not to use scanf? What should I use instead?
What is c language and why we use it?