Assume, user types ./replace E XY test.txt
All instances of the letter E will be replaced by XY in file test.txt
The buffer is declared as char buffer[100].
So the buffer is as below
So in this case since buffer[1] identically equal to argv[1][0],Code:buffer 0 1 2 3 4 5 6 7 8 9 10 [H]-[E]-[L]-[L]-[O]-[]-[W]-[O]-[R]-[L]-[D]
then set buffer[1] = argv[2] *error*
however, I am getting this error: assignment makes integer without cast .
How can I assign the contents of argv[2] to buffer[1]?