Top

Discussion

What will be the output of the program ?

#include

int main()
{
    char str[] = "Nagpur";
    str[0]='K';
    printf("%s, ", str);
    str = "Kanpur";
    printf("%s", str+1);
    return 0;
}

 

  • A.Kagpur, Kanpur
  • B.Nagpur, Kanpur
  • C.Kagpur, anpur
  • D.Error

Answer: D

No answer description available for this question.

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

Post your comment