kathir resh <resh_personal@> wrote:
>

Did you #include <stdio.h>? You must supply a prototype for
variadic functions like printf. If you don't, you have no
real right to expect anything, let alone explain it.

> main()

Better to avoid implicit int...

  int main(void)

> {
>    char *p="hai friends",*p1;

Your program is flawed. Please read...

  http://c-faq.com/decl/strlitinit.html

>  p1=p;
> while(*p!='\0')
> ++*p++;

It's ugly shorthand for ...

  for (; *p != '\0'; ++p)
    ++*p;

> printf("%s%s",p,p1);

You should generally add \n to the end of any text line.
i.e. use "%s%s\n".

> }
> 
>       output   ibj!gsjfoet
> please explain it......

What character comes after 'h' on an ASCII chart?
What character comes after 'a' on an ASCII chart?
What character comes after 'i' on an ASCII chart?
What character comes after ' ' on an ASCII chart?
...

-- 
Peter

Reply via email to