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
What is s or c?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
What are the benefits of organizational structure?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is putchar() function?
What is the difference between fread and fwrite function?
What is a protocol in c?
How can I recover the file name given an open stream or file descriptor?
Do you have any idea how to compare array with pointer in c?
How can I invoke another program or command and trap its output?
How can I write a function that takes a format string and a variable number of arguments?
how to make a scientific calculater ?
What is c method?
Explain b+ tree?