I need help in creating 5 user defined function in C to solve the following problem as shown in the screenshot. Below is the skeleton code for the problem. The 5 user defined functions need to be created in accordance to the screenshot and should be tested in the int main function. The Skeleton Code #include #include typedef char String30[31]; typedef char String60[61]; /* TO DO: Implement the functions as specified in screenshot above RESTRICTIONS: 1. Do NOT call printf() or scanf() in any of the required function definition EXCEPT in the main() function. */ /* Step 1: Define the function that will achieve this step right after this comment. Do NOT call print(), scanf() and any other library functions not indicated above. User defined function has to be made in accordance to step 1 in the screenshot */ /* Step 2: Define the function that will achieve this step right after this comment. Do NOT call print(), scanf() and other library functions that we did not discuss in class. User defined function has to be made in accordance to step 2 in the screenshot */ /* Step 3: Define the function that will achieve this step right after this comment. Do NOT call print(), scanf() and other library functions that we did not discuss in class. User defined function has to be made in accordance to step 3 in the screenshot */ /* Step 4: Define the function that will achieve this step right after this comment. Do NOT call print(), scanf() and other library functions that we did not discuss in class. User defined function has to be made in accordance to step 4 in the screenshot */ /* Step 5: Define the function that will achieve this step right after this comment. Do NOT call print(), scanf() and other library functions that we did not discuss in class. User defined function has to be made in accordance to step 5 in the screenshot */ int main() { String30 firstName, lastName; String60 password; // Do NOT add any printf() for prompts before the scanf() function calls. scanf("%s", firstName); scanf("%s", lastName); // Call Step 1 function after this comment and before the printf() statement. printf("%s\n", password); // prints the password value after step 1. // Call Step 1 function after this comment and before the printf() statement. printf("%s\n", password) // prints the password value after step 1. // Call Step 2 function after this comment and before the printf() statement. printf("%s\n", password); // prints the password value after step 2. // Call Step 3 function after this comment and before the printf() statement. printf("%s\n", password); // prints the password value after step 3. // Call Step 4 function after this comment and before the printf() statement. printf("%s\n", password); // prints the password value after step 4. // Call Step 5 function after this comment and before the printf() statement. printf("%s\n", password); // prints the FINAL password value after step 5. return 0; }
I need help in creating 5 user defined function in C to solve the following problem as shown in the screenshot. Below is the skeleton code for the problem. The 5 user defined functions need to be created in accordance to the screenshot and should be tested in the int main function.
The Skeleton Code
#include <stdio.h>
#include <string.h>
typedef char String30[31];
typedef char String60[61];
/*
TO DO:
Implement the functions as specified in screenshot above
RESTRICTIONS:
1. Do NOT call printf() or scanf() in any of the required function definition
EXCEPT in the main() function.
*/
/*
Step 1: Define the function that will achieve this step right after this comment.
Do NOT call print(), scanf() and any other library functions not indicated above.
User defined function has to be made in accordance to step 1 in the screenshot
*/
/*
Step 2: Define the function that will achieve this step right after this comment.
Do NOT call print(), scanf() and other library functions that we did not
discuss in class.
User defined function has to be made in accordance to step 2 in the screenshot
*/
/*
Step 3: Define the function that will achieve this step right after this comment.
Do NOT call print(), scanf() and other library functions that we did not
discuss in class.
User defined function has to be made in accordance to step 3 in the screenshot
*/
/*
Step 4: Define the function that will achieve this step right after this comment.
Do NOT call print(), scanf() and other library functions that we did not
discuss in class.
User defined function has to be made in accordance to step 4 in the screenshot
*/
/*
Step 5: Define the function that will achieve this step right after this comment.
Do NOT call print(), scanf() and other library functions that we did not
discuss in class.
User defined function has to be made in accordance to step 5 in the screenshot
*/
int main()
{
String30 firstName, lastName;
String60 password;
// Do NOT add any printf() for prompts before the scanf() function calls.
scanf("%s", firstName);
scanf("%s", lastName);
// Call Step 1 function after this comment and before the printf() statement.
printf("%s\n", password); // prints the password value after step 1.
// Call Step 1 function after this comment and before the printf() statement.
printf("%s\n", password) // prints the password value after step 1.
// Call Step 2 function after this comment and before the printf() statement.
printf("%s\n", password); // prints the password value after step 2.
// Call Step 3 function after this comment and before the printf() statement.
printf("%s\n", password); // prints the password value after step 3.
// Call Step 4 function after this comment and before the printf() statement.
printf("%s\n", password); // prints the password value after step 4.
// Call Step 5 function after this comment and before the printf() statement.
printf("%s\n", password); // prints the FINAL password value after step 5.
return 0;
}
![Step Instruction
#
1.
2.
3.
4.
5.
Initialize the password as a concatenation of
Firstname, underscore and Lastname.
If the length of the password is less than 8, add new
characters at the end of the string such that the
length will become 8.
The new characters to be added are chosen such
that they correspond to the sequence of letters (in
the English alphabet). The sequence starts with the
next-letter-after-the-last-character in the Lastname.
If the last character is 'z', the letters to be added
cycle back to 'a'. Examples are shown in the last two
columns of this table.
Be very careful in this step. The original null byte
will be overwritten. Do NOT forget to add a null
byte in the password! Your codes for the next steps
will have a logical error when the null byte is
missing.
Capitalize the first character of the first name and
last name.
Replace lower case vowels as follows: 'a' with '@',
'e' with '3', 'i' with '1', 'o' with '0' and 'u' with '^'.
Upper case vowels should not be replaced.
Replace lower case consonants as follows: 's' with
'*', and 't' with '?'. Upper case consonants should
not be replaced.
Example #1:
Firstname: angelito
Lastname: mercado
Example #2:
Firstname: ron
Lastname: sy
angelito_mercado ron_sy
angelito_mercado ron_syza
Angelito Mercado Ron_Syza
Ang311t0_M3rc@do Ren_Syz@
Ang311?0_M3rc@do Ren_Syz@
Example #3:
Firstname: ik
Lastname: tar
ik_tar
ik_tarst
Ik_Tarst
Ik_T@rst
Ik_T@r*?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F86281811-dc49-44cb-a5d6-286722090d8f%2F1d6186d8-3b18-4e14-a296-62a64b7b932d%2Fowu67y_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)