Show student Information using Structure in C++

Example Program:

Here is the simple program for showing student Information using Structure in C++.

Source Code

using namespace std;
struct student
  char name[30];
  int rollno;
  int age;
int main()
  student s;
  cout<<"\nEnter Student Name: ";
  cin.getline(, 30);
  cout<<"\nEnter Student Roll No: ";
  cout<<"\nEnter Student Age: ";
  cout<<"\nStudent Record:"<<endl;
  cout<<"\nName: "<<<<endl;
  cout<<"\nRoll No: "<<s.rollno<<endl;
  cout<<"\nAge: "<<s.age;
  return 0;
To download raw file Click Here


Enter Student Name: Ram
Enter Student Roll No: CS1201
Enter Student Age: 19
Student Record:

Name: Ram
Roll No: CS1201
Age: 19

Basic Programs

Flow Control

IF Statement Examples

Switch Case

Goto Statement

Break and Continue

While Loop

Do While Loop

For Loop

Friend Function in C++

String Examples

Array Examples

Structure Examples

Structure & Pointer Examples

Structure & Functions Examples

Enumeration Examples

Template Examples


Inheritance Examples

Hierarchical Inheritance

Hybrid Inheritance

Multilevel Inheritance

Multiple Inheritance

Single Level Inheritance

Class and Objects

Constructor Example

Destructor Example

Operator Overloading Example

Operator and Function Example

List of Programs

Pointer Examples

Memory Management Examples

Pointers and Arrays

Virtual Function Examples

Learn All in Tamil © Designed & Developed By Tutor Joes