Vicky One
Member • Oct 17, 2013
Why the answer is -47 ?
I have written a simple code beacuse i have two strings, one is hard coded and the sum of whose adjacent membrs is to be stored in the other string.but the answer of first two indexes of string 1 is different as following:
#include#include #include int main() { char string1[]="011100011"; char string2[9]; cout< This code gives a symile face instead of 1.
while the following code gives 1, why?
#include#include #include int main() { char string1[]="011100011"; char string2[9]; cout< The problem can be solved by 2nd code but what is the true logic behind, can u explain........???
The third code gives -47....
#include#include #include int main() { char string1[]="011100011"; char string2[9]; cout< ???