Question: Objective: C Tutorial: Pointers, Strings, Exec The purpose of this tutorial is to review C pointers and the use of the exec routines to support

Objective: C Tutorial: Pointers, Strings, Exec
The purpose of this tutorial is to review C pointers and the use of the exec routines to support
programming in C required for the assignments throughout TCSS422.
Complete this tutorial using your Ubuntu Virtual Machine installed above.
To complete this assignment, submit written answers to questions 1-9[2 points for each of 1-8; 4 points
for 9(2 for screen shot and 2 for explanations)] as a PDF file to Canvas. MS Word or Google Docs can be
used to easily create a PDF file. Submissions with reasonably answers that demonstrate understanding of
the core content of the tutorial will receive full credit.
Task I: Create a skeleton C program
Start by creating a skeleton C program. Several text editors are available in Linux to support writing C.
The Gnome Text Editor, or gedit for short, is a GUI based text editor similar to notepad in Windows.
Popular command-line based text editors, sometimes called TUI editors, include: vim, vi, pico, nano, and
emacs.
Optionally, try using an Integrated Development Environment for C under Linux. Search the internet to
find one you like.
To invoke these editors, open a terminal in Linux and type the name of the text editor:
pico exec.c
# pico and nano are similar
vi exec.c
# vim is a variant of vi
gedit exec.c &
# & runs the GUI in the background w/o blking the
shell
code exec.c
# for ms vs-code
TCSS 422: Operating Systems Instructor: Juhua Hu
For gedit, a GUI-based editor, it is recommended to background the process. Gedit will then run, and
your command-line window will still be available for other work. The & runs a command in the
background keeping the terminal available for use.
For text-based editors, the terminal will be used for the editor.
Now, enter the following code:
Copy & Paste the following code
#include
int main(int argc, char *argv[])
{
printf("hello world
");
printf("number of args=%d
",argc);
for (int i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!