@quzah & citizen
Both of your ideas work. Thanks.
Type: Posts; User: devilhaunts
@quzah & citizen
Both of your ideas work. Thanks.
I know, that's how C++ does it. I hope the comment was not directed at me.
That certainly makes more sense.
I know how that works.
i m calling them from main.
int main()
{
char *i,*j;
char *str = "something";
//At the point of calling swap below i = str and j is pointing to the last char of str
Hi
I had been working on some code and I had to reverse a string. I tried to use the swap function as follows:
void swap(char *i, char *j)
{
char temp = *i;
*i = *j;
*j = c;
Thanks
Hmm, all this while I hadn't known this. I never saw scanf behaving like that before. Is it because of the while loop?
Hi all
I found this weird problem which I hadn't seen before. I was working on Cygwin (the problem later replicated on a real linux box as well). I was writing a program where I needed to do...