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 / jahid
int a[5]={5,5,5,5,5}
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Is main a keyword in c?
What is the process to generate random numbers in c programming language?
What is 'bus error'?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is const keyword in c?
What are the scope of static variables?
Write a program to print fibonacci series using recursion?
How do I get a null pointer in my programs?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
What is difference between structure and union in c programming?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
How can I get random integers in a certain range?
difference between Low, Middle, High Level languages in c ?
number of times a digit is present in a number
What is %g in c?