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 279 views
1 answer 298 views
298 views asked Apr 6, 2022 by avibootz
1 answer 308 views
1 answer 332 views
332 views asked Apr 6, 2022 by avibootz
1 answer 264 views
1 answer 325 views
1 answer 289 views
...