string - Using strncat with char array element in C -


I get an error with the following code and I can not understand it.

  four names [] = "tolgahan" four results [100] = ""; Strncat (result, name [1], 1);  

I think, I need to change the name [1] to string format but now how can I not do this?

Please help me best regards.

Try:

  strncat (Results, & amp; Name [1], 1);  

or

  strncat (result, name + 1,1); Explanation: In the sequence of a string characters in C, the first letter of the first letter (in memory) is so that if you take the indicators (and by using the operator or adding 1 to the starting indicator) , Then you get a string starting with the second letter of the initial string. 


Comments