SlideShare uma empresa Scribd logo
1 de 2
Baixar para ler offline
Objective - Create a program that initializes and works with string variables. Related SLO -
Develop properly structured multifile programs with automatic compilation. - Implement arrays
and pointers in C. Instructions A. Create a makefile named makefile that will automatically
compile, link, and create an executable for this assignment. - This assignment will not require
any external files such as getdouble.c, getdouble.h - Ensure your makefile is named makefile and
not any other name. B. Create a program named LastnameFirstname15.c, that does the
following: 1. Note: There is no user input for this program. 2. Declare and initialize a char array
that stores your first name in title case. - Title case means the first letter is uppercase and the rest
is lowercase. - Ensure the size/length of the array is equal to the length of your name plus the
null character. As an example, my first name is Edward, therefore the size of the array will be 7.
char firstname[7] = "Edward"; 3. Declare and initialize another char array that stores your last
name in title case. Ensure the size/length of the array is equal to the length of your name plus the
null character. 4. Use the strlen function to get the lengths of each name and store them in
separate variables. 5. Calculate the total length of your name by adding the lengths of the first
name and last name and store it in another variable. 6. Using the char arrays of your name, print
your first and last name along with the lengths of each. 7. Print the total length of your name. 8.
Ensure all of the output above is labeled appropriately. 9. Loop through the first name array and
print out each letter in lowercase on its own line in a staircase fashion. i. Staircase fashion means
that starting from the second letter, output one space in front of the letter and increase the amount
of space by 1 for each letter thereafter. In other words, the third letter should have 2 spaces in
front, the fourth letter should have 3 spaces and so on. ii. Hint: Use an inner for-loop to print out
the spaces. iii. To ensure the letters are all lowercase, use the tolower function. 10. Loop
backwards through the first name array and print out each letter in uppercase on its own line in
reverse staircase fashion. i. To loop backwards, start at the index of the last letter in the string
and count down to index 0. ii. Reverse staircase fashion means the amount of spaces is reversed
from what it would be if looping forward. iii. To ensure the letters are all uppercase, use the
toupper function. 11. Loop through the last name array and print out each letter in toggle case on
its own line in a staircase fashion. i. Toggle case means the casing of the letter is continuously
alternating between upper- and lowercase. ii. To accomplish toggle case, print letters at even
numbered indexes as uppercase and letters at odd numbered indexes as lowercase. 12. The
program should work for any name that is stored in the arrays. For example, if I change the first
name to "Bananabanana" with array size 13, the program will still work without changing
anything else. 13. Ensure your program has the proper includes for the different functions you
will be using for this program. Use the lecture slides to see which header files need to be
included in your program. 14. Be sure to have a program description at the top and in-line
comments. 15. Code adheres to the coding standard. 16. Be sure to have read through the
assignment policy for this class. Example Output
% make % ./program First name "Edward" has length 6. Last name "Meyer" has length 5 .
Total length: 11 di W a r D W D E M e e

Mais conteúdo relacionado

Semelhante a Objective - Create a program that initializes and works with string v.pdf

Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxABDULAHAD507571
 
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best PracticesAbhishek Desai
 
Introduction To Python
Introduction To  PythonIntroduction To  Python
Introduction To Pythonshailaja30
 
Comp 122 lab 7 lab report and source code
Comp 122 lab 7 lab report and source codeComp 122 lab 7 lab report and source code
Comp 122 lab 7 lab report and source codepradesigali1
 
Hello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfHello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfactioncbe1
 
C# conventions & good practices
C# conventions & good practicesC# conventions & good practices
C# conventions & good practicesTan Tran
 
Tutorial perl programming basic eng ver
Tutorial perl programming basic eng verTutorial perl programming basic eng ver
Tutorial perl programming basic eng verQrembiezs Intruder
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbookHARUN PEHLIVAN
 
String Interpolation in Scala
String Interpolation in ScalaString Interpolation in Scala
String Interpolation in ScalaKnoldus Inc.
 
Strings Objects Variables
Strings Objects VariablesStrings Objects Variables
Strings Objects VariablesChaffey College
 
INSTRUCTIONS For this assignment you will be generating all code on y.pdf
 INSTRUCTIONS For this assignment you will be generating all code on y.pdf INSTRUCTIONS For this assignment you will be generating all code on y.pdf
INSTRUCTIONS For this assignment you will be generating all code on y.pdfadayarboot
 
Python_Unit_III.pptx
Python_Unit_III.pptxPython_Unit_III.pptx
Python_Unit_III.pptxssuserc755f1
 
What is the general format for a Try-Catch block Assume that amt l .docx
 What is the general format for a Try-Catch block  Assume that amt l .docx What is the general format for a Try-Catch block  Assume that amt l .docx
What is the general format for a Try-Catch block Assume that amt l .docxajoy21
 
AssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdfAssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdftsekar2004
 
String in python lecture (3)
String in python lecture (3)String in python lecture (3)
String in python lecture (3)Ali ٍSattar
 
Coding convention php
Coding convention phpCoding convention php
Coding convention phpjapan_works
 

Semelhante a Objective - Create a program that initializes and works with string v.pdf (20)

Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
 
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best Practices
 
Introduction To Python
Introduction To  PythonIntroduction To  Python
Introduction To Python
 
Comp 122 lab 7 lab report and source code
Comp 122 lab 7 lab report and source codeComp 122 lab 7 lab report and source code
Comp 122 lab 7 lab report and source code
 
Hello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfHello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdf
 
C# conventions & good practices
C# conventions & good practicesC# conventions & good practices
C# conventions & good practices
 
Tutorial perl programming basic eng ver
Tutorial perl programming basic eng verTutorial perl programming basic eng ver
Tutorial perl programming basic eng ver
 
07 java variables
07   java variables07   java variables
07 java variables
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbook
 
String Interpolation in Scala
String Interpolation in ScalaString Interpolation in Scala
String Interpolation in Scala
 
Strings Objects Variables
Strings Objects VariablesStrings Objects Variables
Strings Objects Variables
 
INSTRUCTIONS For this assignment you will be generating all code on y.pdf
 INSTRUCTIONS For this assignment you will be generating all code on y.pdf INSTRUCTIONS For this assignment you will be generating all code on y.pdf
INSTRUCTIONS For this assignment you will be generating all code on y.pdf
 
Java programlist (1)
Java programlist (1)Java programlist (1)
Java programlist (1)
 
Perl_Part1
Perl_Part1Perl_Part1
Perl_Part1
 
Python_Unit_III.pptx
Python_Unit_III.pptxPython_Unit_III.pptx
Python_Unit_III.pptx
 
What is the general format for a Try-Catch block Assume that amt l .docx
 What is the general format for a Try-Catch block  Assume that amt l .docx What is the general format for a Try-Catch block  Assume that amt l .docx
What is the general format for a Try-Catch block Assume that amt l .docx
 
AssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdfAssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdf
 
String in python lecture (3)
String in python lecture (3)String in python lecture (3)
String in python lecture (3)
 
Unit -1 CAP.pptx
Unit -1 CAP.pptxUnit -1 CAP.pptx
Unit -1 CAP.pptx
 
Coding convention php
Coding convention phpCoding convention php
Coding convention php
 

Mais de amancallularpanjim

Our Space is a social media site that is growing in popularity. The f.pdf
 Our Space is a social media site that is growing in popularity. The f.pdf Our Space is a social media site that is growing in popularity. The f.pdf
Our Space is a social media site that is growing in popularity. The f.pdfamancallularpanjim
 
Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf
 Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf
Oriole Incasements manufactures protective cases for MP3 players. Dur.pdfamancallularpanjim
 
Order the following structures of the Maxillary Nerve (V2), from supe.pdf
 Order the following structures of the Maxillary Nerve (V2), from supe.pdf Order the following structures of the Maxillary Nerve (V2), from supe.pdf
Order the following structures of the Maxillary Nerve (V2), from supe.pdfamancallularpanjim
 
Opci�n multiple Identifique la opci�n que mejor completa el.pdf
 Opci�n multiple Identifique la opci�n que mejor completa el.pdf Opci�n multiple Identifique la opci�n que mejor completa el.pdf
Opci�n multiple Identifique la opci�n que mejor completa el.pdfamancallularpanjim
 
One way to measure the age of the Universe is to... Calculate the loo.pdf
 One way to measure the age of the Universe is to... Calculate the loo.pdf One way to measure the age of the Universe is to... Calculate the loo.pdf
One way to measure the age of the Universe is to... Calculate the loo.pdfamancallularpanjim
 
One way to add Attributes or Variables in your model is via the Assig.pdf
 One way to add Attributes or Variables in your model is via the Assig.pdf One way to add Attributes or Variables in your model is via the Assig.pdf
One way to add Attributes or Variables in your model is via the Assig.pdfamancallularpanjim
 
One of the options is Delta Airlines. They have paid an annual divide.pdf
 One of the options is Delta Airlines. They have paid an annual divide.pdf One of the options is Delta Airlines. They have paid an annual divide.pdf
One of the options is Delta Airlines. They have paid an annual divide.pdfamancallularpanjim
 
One of the key financial statements published by companies is the sta.pdf
 One of the key financial statements published by companies is the sta.pdf One of the key financial statements published by companies is the sta.pdf
One of the key financial statements published by companies is the sta.pdfamancallularpanjim
 
One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf
 One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf
One day, Medro and Mariana were arguing. Medro said that the bread, c.pdfamancallularpanjim
 
Norkstation will be the server, serverb will be the client. a. Crea.pdf
 Norkstation will be the server, serverb will be the client. a. Crea.pdf Norkstation will be the server, serverb will be the client. a. Crea.pdf
Norkstation will be the server, serverb will be the client. a. Crea.pdfamancallularpanjim
 
On June 1,2022, Oriole Company was started with an initial investment.pdf
 On June 1,2022, Oriole Company was started with an initial investment.pdf On June 1,2022, Oriole Company was started with an initial investment.pdf
On June 1,2022, Oriole Company was started with an initial investment.pdfamancallularpanjim
 
Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf
 Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf
Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdfamancallularpanjim
 
Multiple debt breakpoints can occur because the firm has arranged fun.pdf
 Multiple debt breakpoints can occur because the firm has arranged fun.pdf Multiple debt breakpoints can occur because the firm has arranged fun.pdf
Multiple debt breakpoints can occur because the firm has arranged fun.pdfamancallularpanjim
 
Nelson Goh started a sustainable consulting firm called Green Consult.pdf
 Nelson Goh started a sustainable consulting firm called Green Consult.pdf Nelson Goh started a sustainable consulting firm called Green Consult.pdf
Nelson Goh started a sustainable consulting firm called Green Consult.pdfamancallularpanjim
 
Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf
 Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf
Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdfamancallularpanjim
 
Multiple-Step Income Statement and Balance Sheet The following select.pdf
 Multiple-Step Income Statement and Balance Sheet The following select.pdf Multiple-Step Income Statement and Balance Sheet The following select.pdf
Multiple-Step Income Statement and Balance Sheet The following select.pdfamancallularpanjim
 
Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf
 Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf
Multiple choice [Based on AICPA] 1. The billings for transportation s.pdfamancallularpanjim
 
Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf
 Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf
Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdfamancallularpanjim
 
Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf
 Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf
Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdfamancallularpanjim
 
Most rain actually starts as snow in the cloud, then melts before i.pdf
 Most rain actually starts as snow in the cloud, then melts before i.pdf Most rain actually starts as snow in the cloud, then melts before i.pdf
Most rain actually starts as snow in the cloud, then melts before i.pdfamancallularpanjim
 

Mais de amancallularpanjim (20)

Our Space is a social media site that is growing in popularity. The f.pdf
 Our Space is a social media site that is growing in popularity. The f.pdf Our Space is a social media site that is growing in popularity. The f.pdf
Our Space is a social media site that is growing in popularity. The f.pdf
 
Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf
 Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf
Oriole Incasements manufactures protective cases for MP3 players. Dur.pdf
 
Order the following structures of the Maxillary Nerve (V2), from supe.pdf
 Order the following structures of the Maxillary Nerve (V2), from supe.pdf Order the following structures of the Maxillary Nerve (V2), from supe.pdf
Order the following structures of the Maxillary Nerve (V2), from supe.pdf
 
Opci�n multiple Identifique la opci�n que mejor completa el.pdf
 Opci�n multiple Identifique la opci�n que mejor completa el.pdf Opci�n multiple Identifique la opci�n que mejor completa el.pdf
Opci�n multiple Identifique la opci�n que mejor completa el.pdf
 
One way to measure the age of the Universe is to... Calculate the loo.pdf
 One way to measure the age of the Universe is to... Calculate the loo.pdf One way to measure the age of the Universe is to... Calculate the loo.pdf
One way to measure the age of the Universe is to... Calculate the loo.pdf
 
One way to add Attributes or Variables in your model is via the Assig.pdf
 One way to add Attributes or Variables in your model is via the Assig.pdf One way to add Attributes or Variables in your model is via the Assig.pdf
One way to add Attributes or Variables in your model is via the Assig.pdf
 
One of the options is Delta Airlines. They have paid an annual divide.pdf
 One of the options is Delta Airlines. They have paid an annual divide.pdf One of the options is Delta Airlines. They have paid an annual divide.pdf
One of the options is Delta Airlines. They have paid an annual divide.pdf
 
One of the key financial statements published by companies is the sta.pdf
 One of the key financial statements published by companies is the sta.pdf One of the key financial statements published by companies is the sta.pdf
One of the key financial statements published by companies is the sta.pdf
 
One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf
 One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf
One day, Medro and Mariana were arguing. Medro said that the bread, c.pdf
 
Norkstation will be the server, serverb will be the client. a. Crea.pdf
 Norkstation will be the server, serverb will be the client. a. Crea.pdf Norkstation will be the server, serverb will be the client. a. Crea.pdf
Norkstation will be the server, serverb will be the client. a. Crea.pdf
 
On June 1,2022, Oriole Company was started with an initial investment.pdf
 On June 1,2022, Oriole Company was started with an initial investment.pdf On June 1,2022, Oriole Company was started with an initial investment.pdf
On June 1,2022, Oriole Company was started with an initial investment.pdf
 
Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf
 Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf
Name In your own words, explain a). Lytic Life Cycle (Talk about a.pdf
 
Multiple debt breakpoints can occur because the firm has arranged fun.pdf
 Multiple debt breakpoints can occur because the firm has arranged fun.pdf Multiple debt breakpoints can occur because the firm has arranged fun.pdf
Multiple debt breakpoints can occur because the firm has arranged fun.pdf
 
Nelson Goh started a sustainable consulting firm called Green Consult.pdf
 Nelson Goh started a sustainable consulting firm called Green Consult.pdf Nelson Goh started a sustainable consulting firm called Green Consult.pdf
Nelson Goh started a sustainable consulting firm called Green Consult.pdf
 
Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf
 Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf
Nesmith Corporations outstanding bonds have a $1,000 par value, a 12.pdf
 
Multiple-Step Income Statement and Balance Sheet The following select.pdf
 Multiple-Step Income Statement and Balance Sheet The following select.pdf Multiple-Step Income Statement and Balance Sheet The following select.pdf
Multiple-Step Income Statement and Balance Sheet The following select.pdf
 
Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf
 Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf
Multiple choice [Based on AICPA] 1. The billings for transportation s.pdf
 
Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf
 Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf
Multiple cholce [AICPA adapted] 1. fise following revecues were among.pdf
 
Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf
 Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf
Mt. Vesuvius erupted in a very violent explosion in 79 C.E. and burie.pdf
 
Most rain actually starts as snow in the cloud, then melts before i.pdf
 Most rain actually starts as snow in the cloud, then melts before i.pdf Most rain actually starts as snow in the cloud, then melts before i.pdf
Most rain actually starts as snow in the cloud, then melts before i.pdf
 

Último

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Último (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

Objective - Create a program that initializes and works with string v.pdf

  • 1. Objective - Create a program that initializes and works with string variables. Related SLO - Develop properly structured multifile programs with automatic compilation. - Implement arrays and pointers in C. Instructions A. Create a makefile named makefile that will automatically compile, link, and create an executable for this assignment. - This assignment will not require any external files such as getdouble.c, getdouble.h - Ensure your makefile is named makefile and not any other name. B. Create a program named LastnameFirstname15.c, that does the following: 1. Note: There is no user input for this program. 2. Declare and initialize a char array that stores your first name in title case. - Title case means the first letter is uppercase and the rest is lowercase. - Ensure the size/length of the array is equal to the length of your name plus the null character. As an example, my first name is Edward, therefore the size of the array will be 7. char firstname[7] = "Edward"; 3. Declare and initialize another char array that stores your last name in title case. Ensure the size/length of the array is equal to the length of your name plus the null character. 4. Use the strlen function to get the lengths of each name and store them in separate variables. 5. Calculate the total length of your name by adding the lengths of the first name and last name and store it in another variable. 6. Using the char arrays of your name, print your first and last name along with the lengths of each. 7. Print the total length of your name. 8. Ensure all of the output above is labeled appropriately. 9. Loop through the first name array and print out each letter in lowercase on its own line in a staircase fashion. i. Staircase fashion means that starting from the second letter, output one space in front of the letter and increase the amount of space by 1 for each letter thereafter. In other words, the third letter should have 2 spaces in front, the fourth letter should have 3 spaces and so on. ii. Hint: Use an inner for-loop to print out the spaces. iii. To ensure the letters are all lowercase, use the tolower function. 10. Loop backwards through the first name array and print out each letter in uppercase on its own line in reverse staircase fashion. i. To loop backwards, start at the index of the last letter in the string and count down to index 0. ii. Reverse staircase fashion means the amount of spaces is reversed from what it would be if looping forward. iii. To ensure the letters are all uppercase, use the toupper function. 11. Loop through the last name array and print out each letter in toggle case on its own line in a staircase fashion. i. Toggle case means the casing of the letter is continuously alternating between upper- and lowercase. ii. To accomplish toggle case, print letters at even numbered indexes as uppercase and letters at odd numbered indexes as lowercase. 12. The program should work for any name that is stored in the arrays. For example, if I change the first name to "Bananabanana" with array size 13, the program will still work without changing anything else. 13. Ensure your program has the proper includes for the different functions you will be using for this program. Use the lecture slides to see which header files need to be included in your program. 14. Be sure to have a program description at the top and in-line comments. 15. Code adheres to the coding standard. 16. Be sure to have read through the
  • 2. assignment policy for this class. Example Output % make % ./program First name "Edward" has length 6. Last name "Meyer" has length 5 . Total length: 11 di W a r D W D E M e e