"structure in c++ all in one" Code Answer's

You're definitely familiar with the best coding language C++ that developers use to develop their projects and they get all their queries like "structure in c++ all in one" answered properly. Developers are finding an appropriate answer about structure in c++ all in one related to the C++ coding language. By visiting this online portal developers get answers concerning C++ codes question like structure in c++ all in one. Enter your desired code related query in the search bar and get every piece of information about C++ code related question on structure in c++ all in one. 

structure in c++ all in one

By Cute CoyoteCute Coyote on Nov 30, 2020
#include <iostream>
using namespace std;

struct Person {
    char name[50];
    int age;
    float salary;
};

struct Person p;

Person getData();
void displayData();

int main()
{
    struct Person p;
  
    p = getData();
    displayData();
  
    return 0;
}

Person getData() {

    cout << "Enter Full name: ";
    cin.get(p.name, 50);

    cout << "Enter age: ";
    cin >> p.age;

    cout << "Enter salary: ";
    cin >> p.salary;

    return p;
}

void displayData()
{
    cout << "\nDisplaying Information." << endl;
    cout << "Name: " << p.name << endl;
    cout << "Age: " << p.age << endl;
    cout << "Salary: " << p.salary;
}

Source: www.programiz.com

Add Comment

0

All those coders who are working on the C++ based application and are stuck on structure in c++ all in one can get a collection of related answers to their query. Programmers need to enter their query on structure in c++ all in one related to C++ code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about structure in c++ all in one for the programmers working on C++ code while coding their module. Coders are also allowed to rectify already present answers of structure in c++ all in one while working on the C++ language code. Developers can add up suggestions if they deem fit any other answer relating to "structure in c++ all in one". Visit this developer's friendly online web community, CodeProZone, and get your queries like structure in c++ all in one resolved professionally and stay updated to the latest C++ updates. 

C++ answers related to "structure in c++ all in one"

View All C++ queries

C++ queries related to "structure in c++ all in one"

structure in c++ all in one c++ coding structure class is replace by structure bst traversal code in data structure with c++ recursion data structure cpp vector structure c++ vector structure how to append one vector to another c++ Name one example of a “decider” program that you regularly encounter in real life. one line if statement c++ select one random element of a vector in c++ delete one specific character in string C++ c++ how to import only one function is the c++ 20 char te same as the old one find all occurrences of a substring in a string c++ how to grab all of user input c++ c++ initialize array with all zeros all of the stars lyrics cpp goiver all the map values c++ generate all subsets convert all characters in string to uppercase c++ Write a program to find the sum of all sub-arrays of a given integer array. All data types in C++ prints all the keys and values in a map c++ initialize all elements of vector to 0 c++ round all columns in R dataframe to 3 digits all pair shortest path algorithm in c with program initialize vector to all zeros c++ convert all strings in vector to lowercase or uppercase c++ print all unique subsets find all the palindrome substring in a given string Write a C++ program using class and objects. You have to define multiple-member functions outside class and all those functions will be the same name print all substrings in c++ c language all keywords in string how to assign all elements of vector in c++ all trigonometric functions with complex numbers in c/c++ how to find all permutations of n distinct integers in c++ std::map get all keys how to print all numbers in an integer in c++ C++ Book an appointment 2. Change an appointment 3. Cancel an appointment 4. View appointment by last name 5. View all appointment how to round all numeric column types in r

Browse Other Code Languages

CodeProZone