IN C LANGUAGE ONLY PLEASE! First Program: create branchloop.c file Content of the program Enter your name while running...

80.2K

Verified Solution

Question

Programming

IN C LANGUAGE ONLY PLEASE!

First Program:

  1. create branchloop.c file
  2. Content of the program
    1. Enter your name while running your program as you did withhello2.c (using argc and argv) name has to be 2 words max (e.g.Jose Lopez, Maria Rodrigues) . Make sure to check properly.
    2. Print your name 10 times using a loop. 10 is a fixednumber.
    3. Count how many characters are in your first name and lastname.
    4. If the number of characters of your first name is greater thanlast name print my first name is bigger than my last name.
    5. If the number of characters of your first name is less thanlast name then print my last name is bigger than my firstname.
    6. If the number of characters is equal then print my first andlast name have the same number of characters.
  3. Compile the program using: gcc -o branchloop branchloop.c
  4. Run the program using: ./branchloop firstname lastname

Second Program:

  1. Copy branchloop.c to branchloop2.c
  2. Restructure program to add the following functionality
  3. Enter a number at command line representing an index to yourname along with your name. e.g. ./branchloop2 carlos alonso 5
  4. The index number must be within the size of your full name - ifis not an error should be provided (number is larger than your fullname).
  5. If the number fits the length of your name, use the number tofind the letter correspond to it by indexing.
  6. Finally print your name in all lower case, print index number,and print character indexed in upper case.

Third program:

  1. Copy branchloop2.c to branchloop3.c
  2. Use the number entered in command line to:
    1. Print your name that many times
    2. Use a Do-While loop
  3. Count the number of letters in your name.
  4. Print the number of characters in your name followed by yourname backwards.

Answer & Explanation Solved by verified expert
4.5 Ratings (659 Votes)
First Program Code include int main int argc char argv print name 10 time using for loopforint i 0 i 10 iargv1 is first name and argv2 is last nameprintfs sn    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students