// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include #include int main() { char buf[32]; memset(buf, 0, sizeof(buf)); char *cptr = buf; int c; while (cptr != buf + 31 && (c = fgetc(stdin)) != EOF) *cptr++ = (char) c; printf("%s", buf); return 0; }