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 106 views
1 answer 112 views
112 views asked Apr 6, 2022 by avibootz
1 answer 119 views
1 answer 122 views
122 views asked Apr 6, 2022 by avibootz
1 answer 94 views
1 answer 118 views
1 answer 105 views
...