RE: If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char *argv[]) { printf("%c",*++argv[1]); }
When we write argv[1] its the address of 1st character of the string pointed to by argv When we increment argv the address is of the the second string ie friday When we write *++argv[1] its prints the 1st alphabet of the string friday
RE: If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char *argv[]) { printf("%c",*++argv[1]); }
I am sorry argv[1] is the address of the 2 character of the string pointed to by argv...