Object Oriented Programming Using C
Object Oriented Programming Using C
Object Oriented Programming Using C
#include <iostream>
#include <string>
int main()
{
// Declare a variable of type Person
struct student s;
OUTPUT:
Roll No: 23
Marks: 35.7
Student's Name: Arun
Student's Rollno: 23
#include <iostream>
#include <string>
class Student
{
public:
string name;
int rollNo;
char grade;
int main()
{
int n;
Output:
Student Details:
Details for student 1:
Name: Ram, Roll No.: 46, Grade: A
Details for student 2:
Name: Arun, Roll No.: 47, Grade: B