Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / QUESTION 1 Write a C program to get a set of values from the user (Name and vaccination details(yes or no))

QUESTION 1 Write a C program to get a set of values from the user (Name and vaccination details(yes or no))

Computer Science

QUESTION 1 Write a C program to get a set of values from the user (Name and vaccination details(yes or no)). If vaccination by the user is done then get the reference number for vaccination (5 digits) otherwise dont get the number. Use dynamic memory allocation. Sample: Enter your name: Rohit Vaccinated? yes Enter reference number 13245 Output: vaccinated Sample 2: Enter your name: Rohit Vaccinated? no Output: not vaccinated

QUESTION 2 Write a C program to get three names of the user (if user has first, middle and last name). If the user doesn't have a middle name, memory should not be allocated for it. Max size of each name is 8. Print the values at the end after all the inputs have been stored for all the users. Sample: Input: Do you have middle name? Yes Enter your name Richard Phillips Feynman Output: Richard Phillips Feynman Sample 2: Do you have a midlle name? no Enter your name: Albert Einstein Output: Albert Einstein

QUESTION 3 Write a C Program to allocate array based on the number of characters in the days (wednesday). Get the input day from the user and the user is allowed to enter that many floating values as there are characters in the string. Print the values at the end. Input: Todays day: Monday 1.2 2.3 3.4 4.5 5.6 6.7 Output: 1.2 2.3 3.4 4.5 5.6 6.7

QUESTION 4 Write a C program to get n number of names from the user with different sizes (string length to be given by the user). Finally print it in reverse order. Enter Number of names:4 Size of each name: 4 5 6 8 Enter the names: Hari Sahaj Praful Dushyant

QUESTION 5 Use structure and get the following information from three users: Name (String), Employee ID (String) and Phone number (String). Use pointers to find the out the amount of memory occupied by phone number and print the percentage of memory occupied for phone number as compared to other structure members(All members included). Assume that the memory occupied is the memory location in which data is stored. Use specifically pointers and sizeof for calculation. For eg. Name: George (Memory occupied is 6 bytes considering one byte for a character)

QUESTION 6 Use structure and union appropriately to collect the following information from the user. Name, Education Qualification, Percentage or Division (First Division, Second Division and Third Division) according to users choice. Division can be in the form of a string i.e. first, second and third. This can be taken for multiple users.

 

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions