Last active
June 5, 2019 02:20
-
-
Save ghoomfrog/8369d049c32d02eb1e9c675f9af21b9c to your computer and use it in GitHub Desktop.
Program to get ASCII codes of characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char** argv) { | |
// if at least an argument is given to the program | |
if (argc > 1) { | |
// loop through first argument | |
for (int i = 0; argv[1][i] != 0; i++) | |
// print integer representation of character at i | |
printf("%i ", argv[1][i]); | |
puts(""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment