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

Code:
int main()
{
    char str[25];
    scanf("%s", str);
    printf("%s",str);
    return 0;
}
//input: South Africa
  • (A) S
  • (B) South
  • (C) South Africa
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) South

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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