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


Please Help Members By Posting Answers For Below Questions

What is a stream water?

648


Explain how can you be sure that a program follows the ansi c standard?

853


Can a void pointer point to a function?

564


What language is c written?

572


What is double pointer?

554






What is modifier & how many types of modifiers available in c?

602


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

806


What is the difference between typedef and #define?

535


Are c and c++ the same?

623


How do you write a program which produces its own source code as output?

600


Differentiate between a for loop and a while loop? What are it uses?

663


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

748


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

759


Why n++ execute faster than n+1 ?

1833


How is a macro different from a function?

652