CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • [Prototype]

    MemberMar 18, 2014

    The first name you specified actually requires 6 byte of space. So what's effectively happening is, at the run time, aadit took 5 byte with \0 not coming into picture because it's beyond the memory being held by the array. This made the program to think the string has not yet finished and making it jump to the next memory location pointing to jobs\0. This time, since jobs is only 4 bytes it finds the 5th byte as terminating char thus finishing the print.

    If you make jobs as jobss, it'll move forward to print mark as well.
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberMar 18, 2014

    Thank you!
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register