/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>
#include <string.h>

//#define UNICODE
//#define _UNICODE

#include <windows.h>
#include <tchar.h>

int main()
{
    char s1[] = "ABC";
    wchar_t s2[] = L"ABC";
    TCHAR s3[] = _T("ABC");
    printf("%d %d\n", sizeof(s1), strlen(s1));
    if(strcmp(s1, "ABC") == 0)
    {
        printf("%s is ABC\n", s1);
    }
    wprintf(L"%d %d\n", sizeof(s2), wcslen(s2));
    if(wcscmp(s2, L"ABC") == 0)
    {
        wprintf(L"%s is ABC\n", s2);
    }
    _tprintf(_T("%d %d\n"), sizeof(s3), _tcslen(s3));
    if(_tcscmp(s3, _T("ABC")) == 0)
    {
        _tprintf(_T("%s is ABC\n"), s3);
    }
    return 0;
}
