Question
1. Write a shell program to read an input text file and print this line by line to an output text file. The text files
1. Write a shell program to read an input text file and print this line by line to an output text file. The text files must be given from a command line. As a comment, the first line of this input file must be excluded. Take a screenshot showing your shell program and its output: 2. Write a C program - (1) assigning 123 to a[6] using only the pointer q, (2) printing a[6] using only the pointer p in the following C code. Do not modify the following C code and do not use the array a. int a[10], *p, *q; p = &a[2]; q = p+1; Take a screenshot showing your C program and its output:
3. Write a C program to meet the following requirements. As an input file, the file (i.e., test.txt) contains household id, person id, age, and gender for each person as numbers. Your C program will extract person ids corresponding to persons who are female, and more than and equal to 30 and less than and equal to 50 years old. (i.e., 30 persons 50). The starting line is always 0, but the ending line will be given in an argument. If 1000 is given, the persons will be searched up to 1000th lines. Take a screenshot showing your C program and its output.
Step 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