Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: This question about Unix Exercises : The following exercise are designed to get familiar with Unix (Linux) systems. Question 2 Create a C source
Note:
This question about Unix Exercises :
The following exercise are designed to get familiar with Unix (Linux) systems.
Question 2 Create a C source code getinput.c that prompts the user to enter his full name. Save it in an appropriately named file such as getFullName.c. Compile it and execute it. Note the above program is part of C Exercise 2 in Lab 1, therefore, it should be placed inside directory lab01/c_ex2. Some of you may realize that the program name a.out isn't always a good choice. If you wants to use a different name for your executable such as getFullName, use the option -o of gee, as in gec getFullName.c -o getFullName. The option "-o" stands for "Output". Recompile your program to create an executable named getFullName. Note that, by convention, Unix commands or programs do not use extension names, unlike Windows (which uses .exe and.com). Therefore please do not use extension names for your Unix executables. In the above program, we use the standard I/O function fgets to read a line of input from a file, which in this case is the standard input (stdin). Both fgets and stdin are defined in the standard I/O library, therefore, you must include header fileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started