PLEASE NOTE: the upgrades to this server, secure.csse.uwa.edu.au, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49

help2002

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 4 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
1:29am Thu 8th Sep, ANONYMOUS

ANONYMOUS wrote:
> "Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote: > > > ANONYMOUS wrote: > > > > > To return the top command, should the function's header be 'char my_function()' or 'const char *' (suggested by Google)? The compiler returns "address of stack memory associated with local variable 'command' returned..." when returning "m" for testing. Cheers. > > > > This question has no context. > > What is "the top command" ? > > What function? > > When you say "header", do you mean "prototype" or "declaration" ? > > > Hi, yes thanks for the clarification. The top command is one of the values, which could be a sequence of characters, that we should be returning for Project 1 2022. If we were to create a function to return this value, what would the function declaration look like? Would it be 'char my_function()' or 'const char *'to return a sequence of characters for the top command of Project 1?
Oh, I've managed to return the string by declaring a pointer for the value of variable 'command': char *command = "m". Cheers for your time.

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