Top

Discussion

What will be the output of the program ?

#include

int main()
{
    char *names[] = { "Suresh", "Siva", "Sona", "Baiju", "Ritu"};
    int i;
    char *t;
    t = names[3];
    names[3] = names[4];
    names[4] = t;
    for(i=0; i<=4; i++)
        printf("%s,", names[i]);
    return 0;
}

 

  • A.Suresh, Siva, Sona, Baiju, Ritu
  • B.Suresh, Siva, Sona, Ritu, Baiju
  • C.Suresh, Siva, Baiju, Sona, Ritu
  • D.Suresh, Siva, Ritu, Sona, Baiju

Answer: B

No answer description available for this question.

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

Post your comment