Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
binary to txt
#include <stdio.h> #include <math.h> int main(void) { char buffer[9], tmp[] = "Z", finalString[255] = {0}, tmpC; int i = 0, j; do { //printf("Byte input: \n"); scanf("%s", buffer); fgetc(stdin); tmpC = 0; for(j = 0; j < 8; j++) { tmp[0] = buffer[j]; buffer[j] = 0; tmpC += atoi(tmp) * pow(2, 7 - j); } if(tmpC >= 32 && tmpC <= 126) { finalString[i] = tmpC; } else { finalString[i] = '\0'; break; } }while(i++ < 255); printf("Final String: %s", finalString); return 0; }
run
|
edit
|
history
|
help
1
MATRIZ DE CADENAS
Lab 6 v1
Lab 7 blackjack v0.1
ex1
18BCE2182 ASSESS_1 Q2-3
C_141204_ValorNumerico
Hello world.c
Project 5 v.05
9
Maximum of Arrays