strnset(): setting n chars of a string

int main()
   char str1[20] = "plus2net";
   char str2='*';
   printf("Original string : %s \n", str1);
   printf("After  strset() : %s",str1);
   return 0;
The output of above code is here
Original string :plus2net
After strnset() : ****2net
We can set part of the chars of a string to one input string by using strnset() string function.
strnset(main_string, set_string,n);


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer