"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
#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
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.