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; }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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*?
Transcribed Image Text: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*?
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education