I have the following section of code in C:
int main(int argc, char *argv[])
{
char *input;
int lines;
int p;
input = (char*)malloc(10);
input = argv[0];
for(p=0;p<10;p++)
{
printf("%c",input[p]);
}
On my Unix system I make the following call:
./program_name.exe < inputfile
where inputfile is a file that contains the following: 000000010Z
The output I receive to the previous commands is:
./program_
What am I missing?