S
somenath
Hi All,
I am not able to understand the behaviour of the following program
#include<stdio.h>
int main(int agrc,char *argv[])
{
printf("\nReceived val =%s\n",argv[1]);
return 0;
}
When I run the program as follows. I get the correct output
./test '*'
Received val =*
But when I run the program as below. with out '' .
./test *
Received val =1.c
I am not able to understand this difference. Is it happening because
of undefined behaviour? or it is because of the behaviour of the bash
shell?
I am not able to understand the behaviour of the following program
#include<stdio.h>
int main(int agrc,char *argv[])
{
printf("\nReceived val =%s\n",argv[1]);
return 0;
}
When I run the program as follows. I get the correct output
./test '*'
Received val =*
But when I run the program as below. with out '' .
./test *
Received val =1.c
I am not able to understand this difference. Is it happening because
of undefined behaviour? or it is because of the behaviour of the bash
shell?