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 / litan parida
int a[1000];
memset(&a,0,sizeof(a))
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the concept and use of type void.
Differentiate between ordinary variable and pointer in c.
how to build a exercise findig min number of e heap with list imlemented?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What are the header files used in c language?
What does %2f mean in c?
What is the right way to use errno?
What does %p mean c?
Write a program to print “hello world” without using semicolon?
can anyone please tell about the nested interrupts?
using only #include
What is union and structure?
Tell me when would you use a pointer to a function?
What is an auto keyword in c?