πŸ“Š C Programming
Q. How do you convert this char array to string?
Code:
char str[]={'g','l','o','b','y'};
  • (A) str[5] = 0;
  • (B) str[5] = '\0'
  • (C) str[]={'g','l','o','b','y','\0'};
  • (D) All the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All the above

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
218
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
94%
Success Rate