-
Contributing Member
Functions in stdlib.h
Can someone highlight me on the functions present in stdlib.h. I think there is a function called as system in stdlibh. Could someone tell the purpose or the usage of this function also?
-
Expert Member
Re: Functions in stdlib.h
Norman I am not aware about the system function mentioned by you. Hope we get to know about this in discussion by someone. But I could tell some of the functions I am aware of present in stdlib.h . They are namely atoi, atof, atol, calloc, malloc, getenv, putenv. There are of course numerous other functions preset in stdlibh.
-
Expert Member
Re: Functions in stdlib.h
system() is used to issue system command .
it's prototype is present in stdlib.h
on success it returns 0 else it returns a -1.
System() accepts string as an argument
it's prototype is :
int system(const char *command);
-
Junior Member
Re: Functions in stdlib.h
system() is present in stdlib.h
***********************************************
It is used to execute subprocesss and commands inside a program.
These are passed in the form of string as paramater.
int system(const char *command);
it will return -1 on faliure but behaviour may change under some conditions.
*********************************************
-
Contributing Member
Re: Functions in stdlib.h
Your handy C reference manual should list all of the library functions for each header; if it doesn't, get a better one (I use "C: A Reference Manual" by Samuel Harbison & Guy Steele, currently 5th edition).
You can also find the list of library functions in the online draft standard (.pdf file); see section 7.20.4.6 for a description of the system() function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules