all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
14
Task/String-length/C/string-length-4.c
Normal file
14
Task/String-length/C/string-length-4.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
wchar_t *s = L"\x304A\x306F\x3088\x3046"; /* Japanese hiragana ohayou */
|
||||
size_t length;
|
||||
|
||||
length = wcslen(s);
|
||||
printf("Length in characters = %d\n", length);
|
||||
printf("Length in bytes = %d\n", sizeof(s) * sizeof(wchar_t));
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue