Your cart is currently empty!
Question-1 Suppose that you have a text file named contacts.txt listing name (maximum 15 characters), last name (maximum 15 characters) and birth date (in the format dd.mm,yyyy) of people. We do not know how many records are given in that text file but we know that there are at most 100 records in that…
Question-1
Suppose that you have a text file named contacts.txt listing name (maximum 15 characters), last name (maximum 15 characters) and birth date (in the format dd.mm,yyyy) of people. We do not know how many records are given in that text file but we know that there are at most 100 records in that file. A sample text file is provided below.
contacts.txt
PATRICIA JOHNSON 01-02-2000
LINDA WILLIAMS 02-04-1980
BARBARA BROWN 09-01-1995
ELIZABETH JONES 29-05-1960
JENNIFER MILLER 15-08- 1985
MARIA DAVIS 19-06-1999
Write a C program and:
Sample run for the given input file:
Question-2
Write a C program to implement an encryption algorithm described below. In this encryption technique, each letter of a given input word is replaced by a letter some fixed number of positions down the alphabet.
Your program will input a word and an integer value as input values. The integer value indicates the number of position each letter of the word has been moved down. You are given the following sample runs as examples.
Sample Run-1
Enter a word: computer
Enter a number: 4
Encrypted text: gsqtyxiv
Sample Run-2
Enter a word: ZOEY
Enter a number: 4
Encrypted text: DSIC
Sample Run-3
Enter a word: CScience
Enter a number: 5
Encrypted text: HXhnjshj
Hints:
You are given a sample C program which reads name and phone number from a file and prints in the console.
input.txt
sample.c
How to submit
Please also use the following file format while naming the zip file:
How to evaluate
Your program should