In <Xn********************************@130.133.1.4> "Mark A. Odell" <od*******@hotmail.com> writes:
bi*******@yahoo.com (Michael Scarlett) wrote in
news:ce**************************@posting.google. com:
> plz i need the code?
char *cmd = "Shutdown";
system(cmd);
Not portable in the sense that it may do nothing on an ISO C compliant
implementation, like say an embedded system.
^^^^^^^^^^^^^^^^^^
Bogus argument: freestanding implementations need not support any of the
standard C library. Your objection to system() is equally valid to
strlen() or malloc() on a freestanding implementation.
The *right* objection to system() is that its argument is highly platform
specific. Then again, this is equally true for fopen's first argument ;-)
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email:
Da*****@ifh.de