Question: Write a C program that is used to elect candidates from a given list and count vote for the following candidates: 1 . Jhon Doe

Write a C program that is used to elect candidates from a given list and count vote for the following
candidates:
1. Jhon Doe
2. Ima Knight
3. Hillary Clark
4. William Smith
The candidate names are pre-defined in your code which may be done in one of the following ways:
- Use strings to define the candidates. For example: #define candidate1Jhon Doe
- Use arrays. For example: you may use last name of the candidates to take user input for casting
vote.
Your code should have the following functions:
castVote() used to display the candidate list and cast vote for one of the candidates. Take user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!