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
What is the best style for code layout in c?
What are types of functions?
Is null a keyword in c?
What is storage class?
How can I write a function that takes a format string and a variable number of arguments?
Why is c so popular?
What are nested functions in c?
What is the difference between functions abs() and fabs()?
Explain modulus operator. What are the restrictions of a modulus operator?
What are the 5 data types?
How do you override a defined macro?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
How can I read a binary data file properly?
What is a structural principle?
What is the size of structure pointer in c?