M
mdh
I am not sure how relevant to C this is, but here goes.
The exercise is to write a simple program "upper" that is invoked by
this name. The program itself is pretty easy...even for me.
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main (int argc, const char * argv[]) {
int c;
if (strcmp(argv[0], "/Users/m/Desktop/upper/build/Release/
upper")==0)
while ( (c = getchar() ) != EOF)
putchar(toupper(c));
else
putchar(tolower(c));
return 0;
}
<<<<<<
But, my question is this?
When I type "/.....upper" immediately followed by an argument, the
program does not work.
If I type "/...upper" RETURN, then enter the arguments, it works.
Any reason? I have asked on Xcode forum, but no answer yet?
If this is OT, then I apologize.
The exercise is to write a simple program "upper" that is invoked by
this name. The program itself is pretty easy...even for me.
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main (int argc, const char * argv[]) {
int c;
if (strcmp(argv[0], "/Users/m/Desktop/upper/build/Release/
upper")==0)
while ( (c = getchar() ) != EOF)
putchar(toupper(c));
else
putchar(tolower(c));
return 0;
}
<<<<<<
But, my question is this?
When I type "/.....upper" immediately followed by an argument, the
program does not work.
If I type "/...upper" RETURN, then enter the arguments, it works.
Any reason? I have asked on Xcode forum, but no answer yet?
If this is OT, then I apologize.