
please wait
|
|
i
remains uninitialized because comparisons like poz=="A"
are are always false. You compare two pointer which are different. Use strcmp(...)
in order to compare the content of poz
.
==
to compare C strings. That doesn't work. In fact, what you're doing is comparing the address of your poz array with the addresses of various string literals ("A", "B", etc), which obviously is never going to be equal.