Answers for "Print the number 0 using write()"

C
0

Print the number 0 using write()

#include <stdio.h>

int main(void) {
    int n = 123;

    putchar((n % 10) + '0');
    n /= 10;
    putchar((n % 10) + '0');
    n /= 10;
    putchar((n % 10) + '0');

    return 0;
}
Posted by: Guest on June-22-2020

Code answers related to "Print the number 0 using write()"

Code answers related to "C"

Browse Popular Code Answers by Language