Question: 1. Write two small c programs. a). The first program pre.c should read in a list of student names and their GPAs. To be simple,
1. Write two small c programs. a). The first program "pre.c" should read in a list of student names and their GPAs. To be simple, you can just input the students' first names. Enter the inputs through the keyboard and display the output on the screen. The input ends when an EOF is encountered. The output of the program should display the students whose GPAs are above 3.0. For example, the following are the inputs to "pre.c". Susan 3.1 John 2.0 David 3.5 Jessica 3.4 Ctrl-D (to terminate the input.) then "pre.c" produces the output: Susan David Jessica Note: an EOF is usually 'sent' to a process by hitting a CTRL_D. If you type stty -an on your unix command line, you can get info that tells you which keyboard keys mean what. FYI, in c, to put values to standard_out use printf(). To get values from standard_in use scanf() or getchar(). b). The second program "sort.c" reads in a list of student names from the keyboards and displays them in alphabetical order on the screen. Assume the sequence is read until an EOF is encountered. If the inputs are: Susan David Jessica The outputs should be: David Jessica Susan
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
