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 a stream water?
Explain how can you be sure that a program follows the ansi c standard?
Can a void pointer point to a function?
What language is c written?
What is double pointer?
What is modifier & how many types of modifiers available in c?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is the difference between typedef and #define?
Are c and c++ the same?
How do you write a program which produces its own source code as output?
Differentiate between a for loop and a while loop? What are it uses?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
Why n++ execute faster than n+1 ?
How is a macro different from a function?