Trying to create a simple C char to ASCII convertor
But the result print "10" after each printf.
Any Ideas to resolve that?
Compiler: mingw64/gcc
Source:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main() {
char argc;
printf("Enter for ASCII: ");
do {
scanf("%c", &argc);
printf("%d\n", argc);
} while (argc != 'Z');
}
Output:
$ ./ascii.exe
Enter for ASCII: A
65
10
S
83
10
D
68
10
V
86
10
X
88
10
Z
90