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
Are there constructors in c?
What is a memory leak? How to avoid it?
What is a good data structure to use for storing lines of text?
What is a structure and why it is used?
What is variable declaration and definition in c?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is the purpose of & in scanf?
Write a code of a general series where the next element is the sum of last k terms.
What is indirection? How many levels of pointers can you have?
How can I call a function with an argument list built up at run time?
Write a program to check prime number in c programming?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Define and explain about ! Operator?
List out few of the applications that make use of Multilinked Structures?