How to use _strset_s in windows with C

2 Answers

0 votes
#include <windows.h>
#include <string.h>
#include <stdio.h>


int main(void)
{
    char s[32] = "c programming";

    _strset_s(s, _countof(s), '*');

    printf("%s\n", s);

    char ch = getchar();

    return 0;
}
 



/*
run:

*************

*/

 



answered Apr 7, 2022 by avibootz
0 votes
#include <windows.h>
#include <string.h>
#include <stdio.h>

int main(void)
{
    char s[32];

    s[31] = '\0';

    _strset_s(s, _countof(s), '*');

    printf("%s\n", s);

    char ch = getchar();

    return 0;
}
 



/*
run:

*******************************

*/

 



answered Apr 7, 2022 by avibootz

Related questions

1 answer 181 views
1 answer 182 views
182 views asked Apr 6, 2022 by avibootz
1 answer 198 views
1 answer 215 views
215 views asked Apr 6, 2022 by avibootz
1 answer 167 views
1 answer 192 views
1 answer 186 views
...