How to use swprintf to write formatted data to wide string in C

1 Answer

0 votes
#include <stdio.h>
#include <wchar.h>

int main ()
{
    wchar_t buffer[32];

    long b = 900000000;
    swprintf(buffer, 32, L"%d b = %ld\n", 88888, b);

    fputws(buffer, stdout);

    return 0;
}




/*
run:

88888 b = 900000000

*/

 



answered Jun 19, 2021 by avibootz

Related questions

...