Solving what problem?I can find length of string, program #29 and I know what's swaping, look at following code
A = 1C:#include<stdio.h> #include<stdlib.h> int main (void) { char temp; char A = '1'; char B = '2'; printf(" A = %c \n", A ); printf(" B = %c \n", B ); temp = A; A = B; B = temp; printf(" A = %c \n", A ); printf(" B = %c \n", B ); return 0; }
B = 2
A = 2
B = 1
I'm having trouble solving problem and can't figure out how to do it.
If you are referring to the string reversal problem, you have all the ingredients already. What else do you need besides outlining the algorithm itself.
You expect us to do everything for you?