Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

guys can anyone help with learning files and file operations in c.......and command line arguments in c

OpenStudy (anonymous):

you can learn it with thenweboston

OpenStudy (anonymous):

Give me a medal

OpenStudy (anonymous):

yes,but be specific what do you want?

OpenStudy (anonymous):

hey if u find it a good ans then give me a medal

OpenStudy (anonymous):

In C, command line arguments are passed into your program via your main functions parameters. int main(int argc, const char **argv) Means that the number of arguments your program received is in argc and argv holds the address of an array of strings which are the arguments themselves. If you would like to print them out you could simply have your function written thusly: #include <stdio.h> int main(int argc, const char **argv) { int i =0; for(; i < argc; i++) printf("%s\n", argv[i]) return 0; } File and file operations are not really well defined by C and fall more under the domain of your operating system, though most are at least a little POSIX compliant.

OpenStudy (anonymous):

Forgot a semi-colon on the printf statement. Sorry bout that.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
3 hours ago 3 Replies 0 Medals
Arriyanalol: help
3 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 3 Medals
Jaded012023: Please tell me what you all think of this song
6 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
6 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!