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
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
Where can I get an ansi-compatible lint?
diff between exptected result and requirement?
How do you convert strings to numbers in C?
What do header files do?
Explain how many levels deep can include files be nested?
Can a local variable be volatile in c?
can anyone please tell about the nested interrupts?
Can the sizeof operator be used to tell the size of an array passed to a function?
please give me some tips for the placement in the TCS.
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
How can I use a preprocessorif expression to ?
Write program to remove duplicate in an array?
What is c programming structure?