// Andrew Taylor - andrewt@unsw.edu.au // 6/3/2017 // Printing binary representation of ints // This is not a programming example - it uses features not taught in this course (or nor not yet taught) #include int main(void) { int a, j; while (1) { printf("Enter an int: "); scanf("%d", &a); j = 8 * (sizeof a); while (j > 0) { j = j - 1; printf("%d", (a >> j) & 1); } printf("\n"); } return 0; }