Question

Compile, and execute a simple C program as a background process in Linux and use ps...

Compile, and execute a simple C program as a background process in Linux and use ps aux to show the task.

Please give me full steps.

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

Below i have written a simple Hello program in C language.

Please see the steps below.

=================================================================

Program:

=================================================================

#include<stdio.h>

int main()

{

printf("Hello World\n");

return 0;

}
=================================================================

Step1:

Please create an executable of the program

gcc Hello.c -o Hello

Step:2

To run the program in background please add the & character after the program name.

Hello &

Step:3

to see the background process please fire the command as below

ps aux | grep "Hello"

==================================================================

Here is a complete screenshot

==================================================================

Kindly Check and Verify Thanks...!!!

Add a comment
Know the answer?
Add Answer to:
Compile, and execute a simple C program as a background process in Linux and use ps...
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
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