A

Admin • 833K Points
Coach

Q. What is the output of C Program with String arrays?

Code:
int main()
{
char *p1 = "GOAT";
char *p2;
p2 = p1;
p2="ANT";
printf("%s", p1);
}
  • (A) A
  • (B) G
  • (C) GOAT
  • (D) ANT
  • Correct Answer - Option(C)
  • Views: 28
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.