C++ How to dispaly details for students and Create object for student class and input dispaly details

C++ How to dispaly details for students and Create object for student class and input dispaly details

1.Create a class called student with following descriptions Data member : Rno - int Name - char[20] Std - int Mark1 int Mark2 - int Mark3 - int Member function Getdata() - To input details for students Putdata() - to dispaly details for students Create object for student class and input dispaly details.

View Answers

May 8, 2012 at 4:26 PM

The given code defines a class Student which describes two member functions. The function Getdata() accepts the student roll no, name and marks of three subjects from the user and Putdata() display this information.

#include <iostream>
#include <stdio.h>
#include <conio.h>

using namespace std;
class student
{
      private :
             int sno;
             char name[20];
             int m1,m2,m3;
      public :
             void Getdata()
             {
                   cout << "Enter Student No.  "; cin >> sno;
                   cout << "Enter Student Name  "; cin >> name;
                   cout << "Enter Student 3subjects marks  ";
                   cin >> m1 << m2 << m3;
             }
             void Putdata()
             {
                   cout  << "Student number  :" << sno;
                   cout << "Student name      :" << name;
                   cout << "Student marks     :" << m1 << "  " <<m2<<"  "<<m3;
            }
};
void  main()
{
      student s;
      s.Getdata();
      s.Putdata();
      return 0;
}]









Related Tutorials/Questions & Answers:
C++ quuestion 1
C++ How to dispaly details for students and Create object for student class and input dispaly details   1.Create a class called student... Putdata() - to dispaly details for students Create object for student class
student details
student details  create an application for details of 1st to 5th standard students by using loops and scanner
Advertisements
student details
student details  hi sir/madam i have a doubt in PHP how to insert student details using mysql with php..   Have a look at the following link: PHP Mysql insert
using list iterator create student details - JavaMail
which will describe you how to create Student class and add its properties...using list iterator create student details  write a java program to create student class with particulars like name, rno, marks,etc. and print them
how to develop student details using springs
how to develop student details using springs  how to develop student details using springs
how to dispaly pdf file on browser
how to dispaly pdf file on browser  In my project i have created one pdf file(by pdfwriter) into my local mechine . after that it need to display in browser as a pdf file . but in jsp i can't display by tag can anyone give me
Write a program to get student details and store in a database
Write a program to get student details and store in a database  Write a program to get student details and store in a database
Dispaly Inbox Image - Development process
Dispaly Inbox Image   I want to Display Inbox image when user(Client) send Message to Server in (Windows Application ) VISUAL BASIC.NET 2008, plz Help Me
Design a registration.jsp page with input for user registration details
Design a registration.jsp page with input for user registration details  Design a registration.jsp page with input for user registration details like... submitting this details, display the details onto the display.jsp page using
how to code-updating some details n some details r unchanged
how to code-updating some details n some details r unchanged  i have created a page with empty text boxes,details are.... house... : bloodgroup : my requirement is to update the details of user. and i had written
how to access the details - Java Beginners
how to access the details  how to access the detailsclass E { String name; String no;string place; E(String n,String n,String p) { ... ... .... } public String... no)and retrive all the details of the person which is not given
APLIANCE DETAILS
that contains the Appliance class. Now I want to create a class named NewAppliance that stores the details of the newly launched appliances.I used the following syntax to code the NewAppliance class that inherits from the Appliance class
How to create an input box?
How to create an input box?  How to create an input box
scjp details
scjp details  SCJP fees details abou scjp? What are the best books for preparing to scjp? How many time scjp exam's are conducted for one year
customer details
customer details  write a java code to enter n number of persons details(name,address,phone number) in a array list. Also consider exceptional cases like entering integer in name,character in phone number. use try,catch ,throw
How to extract details from XML? - JSP-Servlet
How to extract details from XML?  I want to extract details from http://service.openkapow.com/palanikumar/airportantigua.rest How can i extract details from this link?Here is my program... Airport
Maintaining States of Selected CheckBoxes in Different Pages using dispaly table in struts2
Maintaining States of Selected CheckBoxes in Different Pages using dispaly table in struts2  Hi, I am working in a Struts 2 project where in the jsp... me how to maintain States of Selected CheckBoxes in Different Pages using
how to retrive other details with an image - Swing AWT
how to retrive other details with an image  hello I m trying..... followingis my code..plz advice me how to get both values as well as image at a same...("Select visitor_firstname,Type_code, image_data from visiting_details where Ticket
how to get the details of username&password of mysql - JDBC
how to get the details of username&password of mysql  Hi friends, i installed mysql 5.5 on my system successfully,but the thing is i forgotten the username and password .please tell me how to get those details . Thanks
How to display gridview details to labels dynamically?
How to display gridview details to labels dynamically?  I am using SQLDataSource to connect to MySQL. I have a gridview that retrieves information... to display however, it always displays the details of the previously selected id
How to read user input in C++
How to read user input in C++  How can i get an input from the users in C++?   You can use the standard input "cin" to get the input from user.. For example: int age; cin >> age
Can you create an object of an abstract class?
Can you create an object of an abstract class?   Hi, Can you create an object of an abstract class? Thanks
Mouseover Image Dispaly
How to create file from input values in Jframe ?
How to create file from input values in Jframe ?  hi i m doing my... an object for it.my java code is public class submit { JFrame frame; JTextArea... the user's academic details and on clicking the submit button,it displays all
ModuleNotFoundError: No module named 'details'
'details' How to remove the ModuleNotFoundError: No module named 'details...ModuleNotFoundError: No module named 'details'  Hi, My Python... to install padas library. You can install details python with following command
how to send email please give me details with code in jsp,servlet
how to send email please give me details with code in jsp,servlet  how to send email please give me details with code in jsp,servlet
program to create student report using java applet,read the input using text boxesand generate the grades..?
program to create student report using java applet,read the input using text boxesand generate the grades..?   sir plz give me java applet codes for above question
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?  HELLO SIR, CAN ANYONE HELP ME OUT HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILES,IF I ENTER 4 EMPLOYEE DETAILS(NAME,ID,SALARY,EMAIL) ALL THE DETAILS OF 4
bank details - JSP-Servlet
is first to set the user account details in database, and the to create a login...bank details  hi i just need a coding for bank details... since iam... is did is i created a database for users account details and created a login
JDBC: Get Column Details Example
JDBC: Get Column Details Example In this tutorial, we are describing how to get column details of a table using JDBC API. Get Column details : For displaying details of table columns, You can use "SHOW COLUMNS table_name"
searching inside a file for details
searching inside a file for details  i created a file with name,country,state etc...when i'm searching for the name, i have to get other details like country,state etc...please do help
program on employee details
program on employee details  to write a program on displaying the employee details like empid,empname,wonno,location,leave type by using the text fields in java swings
How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java
data science details
data science details  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science details Try to provide me good examples or tutorials links so that I can learn
data analyst course details
data analyst course details  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data analyst course details Try to provide me good examples or tutorials links so that I
artificial intelligence course details
artificial intelligence course details  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: artificial intelligence course details Try to provide me good examples
ai course details
ai course details  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ai course details Try to provide me good examples or tutorials links so that I can learn the topic
machine learning course details
machine learning course details  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: machine learning course details Try to provide me good examples or tutorials links so
j2ee environment varaiable details
*; import java.io.*; public class helloworldservlet extends genericservlet
jsp page to Showuser details
; <td><input type="button" value="Add New User" onclick="javascript
Employee Details - JSP-Servlet
to do that, you have to forward form to either java action class or to some jsp (i.e
How to Create Student Registration Form with HTML Code?
How to Create Student Registration Form with HTML Code? At present, the concept of online student registration form has emerged as a great relief... will learn to create a student registration form using html code in easy steps
How to create dynamic array in C?
How to create dynamic array in C?  How to create dynamic array in c programming language?   Dynamic Array in C Tutorial
ModuleNotFoundError: No module named 'secret_details'
named 'secret_details' How to remove the ModuleNotFoundError: No module named 'secret_details' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'secret_details'  Hi, My
the grade of students
a number of students in a class. Then, prompt user to input the student�s programming mark. Determine how many student get A+ and A for their grade and how many students get D and E based on the following table: Marks
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
implementation object in C
implementation object in C  how to create and implement an object in C
How to create a Student data base using Linked List in java
How to create a Student data base using Linked List in java  I want... want anything it should display null   import java.util.*; class...")); Scanner input=new Scanner(System.in); System.out.print("Enter record
create examination slip for students
create examination slip for students  hello,can anyone help me how to create examination slip that include subject code,courses,credit hours,grade ,and status

Ads