Forums Programming Assignment Help What will print out?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15176
    ahprofessional
    Participant

    What will print out?

    main()
    {
    char *p1=”name;
    char *p2;
    p2=(char*)malloc(20);
    memset (p2, 0, 20);
    while(*p2++ = *p1++);
    printf(“%sn”,p2);
    }

    #15182
    juwanine
    Participant

    Ans : empty string

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.