Question

Write a command to compile a C program named MyC.c and save the executable in a...

Write a command to compile a C program named MyC.c and save the executable in a directory called MyCPrograms under the name MyC.out (the directory MyCPrograms is a subdirectory of the home and you are currently in the home directory).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program name: MyC.c

Current Directtory: Home

To compile a c program gcc command is used and for specifying directory for out file we need to use option "-o"

so our command will be,

gcc MyC.c -o MyCPrograms/MyC.out

Note: As per given MyCPrograms is in home directory.

Add a comment
Know the answer?
Add Answer to:
Write a command to compile a C program named MyC.c and save the executable in a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 20. Write the DOS command to erase a file named FILEBILL which is stored in the...

    20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....

  • Open Command Prompt typing CMD command in your Search window. Change the directory from current to...

    Open Command Prompt typing CMD command in your Search window. Change the directory from current to root (C:). Make a new directory called CIS165_Your Last Name (example: CIS165_Nossa). Within this directory, make subdirectories called Can1 and Can2. Verify the created directory and subdirectories using particular command. Under Can1 subdirectory creates three files called Jam.txt, Milk.txt and Juice.txt. Verify that you created these files using particular command. Move Jam.txt file from the Can1 subdirectory to the Can2 folder. Compare using special...

  • A) Write a command that will execute the file named main and report memory management errors...

    A) Write a command that will execute the file named main and report memory management errors (memory leaks) when the program has finished. B) Write a command that will generate an executable file named main from the C++14 source code file main.cpp that includes all available debugging information. After this command, write a second command to start the C++ debugger in text user interface.

  • Write a Java program that lists all the files in a directory and their subdirectories, that...

    Write a Java program that lists all the files in a directory and their subdirectories, that mimics the Unix ls command or the Windows dir command. Note that when a directory is encountered we do not immediately print its contents recursively. Rather, as we scan each directory, place any subdirectory in a List. After the directory entries are printed then process each subdirectory recursively. For each file that is listed, include the modification time, the file size, and if it...

  • Write a C program countFiles.c to be executed on the command line as follows: countFiles <directory> The program...

    Write a C program countFiles.c to be executed on the command line as follows: countFiles <directory> The program should count the (regular) files in the specified directory as well as all subdirectories and output the total number on the console. Files and subdirectories whose names .start with should be ignored! To do this, define a function int countFilesRec(char* dirName)that dirName returns the number of (regular) files in the directory and all the subdirectories. Call the function recursively to count the...

  • 2. Answer the correct command instructions to complete the following: a. What is the admin account...

    2. Answer the correct command instructions to complete the following: a. What is the admin account (username) you created in Lab 1 and write down its home directory (full folder name)? [0.5 pts) b. Assume the following directory structures in your home directory: • /home/(username)/ — use your own (home directory) • /home/(username) /Dir1.0/Dir1.1/ • /home/(username) /Dir2.0/Dir2.1/ in your home directory, create directories Dir1.0 & Dir 2.0, then create directories Dirl.1 & Dir2.1 inside other directories according to above. [1...

  • 1) Write a complete C or C++ program to print Hello World Greetings. 2) Using the...

    1) Write a complete C or C++ program to print Hello World Greetings. 2) Using the command line, compile and generate the executable for the above program. Let’s call helloWorld the target executable. 3) Write a C program that does the following: a) forks a child to execute helloWorld b) waits for the child execution to end 4) Reuse the above program to try a different variant of exec family of system calls. OPTIONAL: 1) write a program main that...

  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and...

    In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and you have two files nomed datol and dotaz in your current directory. What command can you use to copy the data and dotaz files from your current working directory to the datafiles directory? TTT Artal 3120 T.... 5 BE36 Pantep Words: 0

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT