Write a c program that contains a structure

Assignment Help C/C++ Programming
Reference no: EM132194776

Question: Write a C program that contains a structure that uses predefined types and union.

• Create a struct with name, age, kind (Either child, college student, or adult), and kindOfPerson (Either kid, student, or adult)

• kids have a school field. Students have college and gpa. Adults have company and salary.

• Create one non-dynamic struct with the content for a college student: "Bob", 20, K-State, 3.5

• Create one struct dynamically for a kid with: "Alison", 10, "Amanda Arnold Elementary"

• Implement a function that can be used to display the contents of a single structure

• Print out both structures

• Free up the memory allocated before exiting

Reference no: EM132194776

Questions Cloud

A program to help the administration of a football league : Write a C++ program to help the Administration of a football league to manipulate the list of players registered in different teams.
Write a c program which will flip a single bit in a number : Write a C program which will flip a single bit in a number entered by the user using the binary representation of the number. The user should input the original
A program that initializes an array with ten random integers : Write a C++ program that initializes an array with ten random integers and then prints all elements in two lines of output containing.
Write a program that creates a vector of given elements : Write a C++ program that creates a vector of 15 integer elements. Using an iterator, assign each element a value that is three times of its current value.
Write a c program that contains a structure : Write a C program that contains a structure that uses predefined types and union. Create a struct with name, age, kind (Either child, college student, or adult)
A c program that will check the current setting of echo : Write a C program that will check the current setting of "echo". It it is on, display the message and turn it off.
Write a program to create two files : Write a C++ program to create two files named abc.txt which contains the text I love C++ Programming and def.txt which contains the text.
A program for the frequency histogram : Write a C++ program (c++14). ask the user give some inputs. and then output the frequency histogram of them.
Write a c program that defines a data type : Write a C program that defines a data type (structure ) called course which includes the following fields on Computer Science courses.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that has user enter

Write a program that has user enter a sentence and then determine how many lower case letter were entered. You need to write a logically coherent function that will determine if character is lower case or not. Main will also display the total?

  Time constraints and the type of audience

Your supervisor agrees with your proposal but warns you of time constraints and the type of audience you have. Your supervisor outlined the following requirements for you to follow:

  Create a template class

Create a template class, SVector, that implements a constructor

  Make an explicit statement of the invariant of the set class

Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.

  Build a table of reynolds numbers at flow velocities

Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)

  Write a c program to compute dr if f1=50 lb and f2 = 4000

make a program for:A hydraulic lift as shown below from fluid mechanics, it can be shown that a small force F1     acting over a piston of diameter D 1    can be multiplied into a large force   F 2    acting over a piston of diameter D 2  .

  Write a program that teaches arithmetic to a young child

Write a program that teaches arithmetic to a young child. The program tests addition and subtraction. In level 1 it tests only addition of numbers less than 10.

  Write a parallel program with the sequent simulator

Complete the following program to write a parallel program with the Sequent Simulator for the following task: Hire two processors. One processor searches the first half of a array and finds the largest number. The second processor searches the sec..

  How would you put a empty space between output

How would you put a empty space between output, right now it prints 6 rows but how do i add a space or a "\n" for example row1 row2 row3

  Evaluate a project on number plates

'A project on Number plates; I have successfully implemented a method for character localisation, character segmentation and character recognition.

  What is encapsulation?

What is encapsulation? Why encapsulate in object oriented development?

  Features with the real life scenarios

Explain any three features that must be implemented by the application that will be created by WebSoft Solutions Pvt. Ltd. Support your answer with suitable examples. Relate the features with the real life scenarios.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd