Access over 20 million homework & study documents

search

3 c) Consider the array called datum declared as int datum[N], writ

Content type
User Generated
Rating
Showing Page:
1/1
3. c) Consider the array called datum declared as int
datum[N], write a code fragment that will fill it with zeros
(ie., all elements will be set to 0)
Use a while-loop to fill the array
Solution
Here is the code:
int i = 0;
while ( i <N)
{
datum[ i]=0;
i++;
}

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
3. c) Consider the array called datum declared as int datum[N], write a code fragment that will fill it with zeros (ie., all elements will be set to 0) Use a while-loop to fill the array Solution Here is the code: int i = 0; while ( i ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4