Trivial C question: iterating through chars
Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.
Chris Richard Adams chrisa at ASPATECH.COM.BRFri Apr 20 08:29:00 PDT 2001
- Previous message: What is the best C IDE on Linux?
- Next message: Trivial C question: iterating through chars
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'd like to view all the ASCII chars on my system. I tried:
char ch = 'NUL';
int i;
for ( i = 0; i < 500; i++)
printf("Char: %c/n", ch + i");
This fails.
1.) What is illegal here?
2.) Can I use chars in my for look also...something like:
for ( ch = 'NUL; i < 500; ch++, i++)
Thanks,
Chris
- Previous message: What is the best C IDE on Linux?
- Next message: Trivial C question: iterating through chars
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Beowulf mailing list
