Answers for "c print number from char"

C
2

print digits of a number in c

#include <stdio.h>

int main(){
    int num = 1024;

    while(num != 0){
        int digit = num % 10;
        num = num / 10;
        printf("%dn", digit);
    }
  
    return 0;
}
Posted by: Guest on July-08-2020
8

int to char in c

c = i +'0';
Posted by: Guest on October-20-2020

Code answers related to "C"

Browse Popular Code Answers by Language