Right now I\'m trying this:
#include
int main(int argc, char *argv[]) {
if (argc != 3) {
printf(\"Usage: %s %s sourcecode inpu
Rather than use strlen as suggested above, you can just check for the NULL character:
#include
int main(int argc, char *argv[])
{
const char *const pszSource = "This is an example.";
const char *pszChar = pszSource;
while (pszChar != NULL && *pszChar != '\0')
{
printf("%s", *pszChar);
++pszChar;
}
getchar();
return 0;
}