Top

Discussion

What will be the output of the program ?

#include
void swap(char *, char *);

int main()
{
    char *pstr[2] = {"Hello", "IndiaBIX"};
    swap(pstr[0], pstr[1]);
    printf("%s\n%s", pstr[0], pstr[1]);
    return 0;
}
void swap(char *t1, char *t2)
{
    char *t;
    t=t1;
    t1=t2;
    t2=t;
}

 

  • A.IndiaBIX
    Hello
  • B.Address of "Hello" and "IndiaBIX"
  • C.Hello
    IndiaBIX
  • D.Iello
    HndiaBIX

Answer: C

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment