Q. What will be printed by the C program?

Code:
# include <stdio.h>
int main( )
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
    *p = '0' ;
    printf ("%s", s1);
}
  • (A) 12
  • (B) 120400
  • (C) 1204
  • (D) 1034
πŸ’¬ Discuss
βœ… Correct Answer: (C) 1204

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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