0
   

Help Me Please!I need help on these C-program questions?

 
 
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'.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 662 • Replies: 1
No top replies

 
Lordyaswas
 
  1  
Reply Tue 12 Nov, 2013 09:13 am
Do you have some keys missing from your typing wotsit, karm old boy?
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » Help Me Please!I need help on these C-program questions?
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/03/2024 at 04:39:38