PLEASE NOTE: this server,, will be unavailable on WEDNESDAY 7th December, from 1pm until 4pm.
Web-based programs, such as csmarks, cssubmit, and the help fora, will all be unavailable.
  It's UWAweek 49


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying selected article
Showing 1 of 919 articles.
Currently 5 other people reading this forum.

 UWA week 39 (2nd semester, week 9) ↓
SVG not supported

Login to reply

4:21pm Fri 30th Sep, Gihad C.

Piggybacking on this thread as I had a related question...

From what I understand, strcat_p only works as intended when there just happens to be enough memory adjacent to the dest string where we can copy the entire src (plus '\0'). If there happened to be other (meaningful but currently irrelevant) data in the adjacent memory, wouldn't we be rewriting this memory by doing "*dest = *src" (where dest is a pointer to the last character in destination string)?

How do you increase the amount of space available for the destination string to be lengthened by? Are you not passing a pointer to a string that already has a defined size at runtime(?)

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy