Reply
Tue 12 Nov, 2013 09:12 am
1. Declare an arrays of 10 chars called str of size
i'm thinking it will be:
int str [9];
but im confused on the rest
2.Show the steps (also called an "algorithm or "recipe") to determine the length (number of characters without including the terminating '\0') of a correctly initialized array of characters called str.
Use "English-like" or C-like descriptions instead of actual C code.
Do not use strlen()!
3.Write a function init_str that matches the prototype :
void init_str(char *str, int len, char c);
that initializes the array of characters that str points to. The size of array is len. Please place the value of the character 'c' in each position of the array with len - 1 elements and terminate the array with '\0'.
Do you have some keys missing from your typing wotsit, karm old boy?