Forums Programming Assignment Help What will print out?

This topic contains 1 reply, has 2 voices, and was last updated by  juwanine 6 years, 2 months ago.

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.