#include<iostream.h>
#include<conio.h>
class data
{
private :
int em_no;
char name [20];
float basic;
public :
data(); // default constructor
void putdata();
};
data :: data()
{
em_no = 0;
name[0] = '\0' ;
basic = 0;
}
void data :: putdata ()
{
cout<<"The initialized data by default constructor is : "<<endl;
cout<<"Employee No. = "<<em_no<<endl;
cout<<"Employee Name = "<<name<<endl;
cout<<"Basic Pay = "<<basic<<endl;
}
int main()
{
data obj;
obj.putdata();
getch();
return 0;
}
SiteMap
|
Link Us
...Language...
English
French
German
Hindi
Italian
Russian
Japanese
Chinese
Home
|
About Us
|
Portfolio
|
Services
|
Career
|
Contact Us
|
Industrial Training
|
Achievement
Corporate Services
Web Design and development
Web Promotion (SEO)
Multimedia/CD Presentation
Software development
E.Commerce
Training@balujalabs
Software Courses
Hardware Courses
Networking.Courses
Mobile Repairing Courses
UGC Degrees
Student Corner
Programming & Projects
Placement Papers
Project Ideas
Synopsis Ideas
Franchise Section
Administrator
Franchise Inquiry
To demonstrate the use of default constructor for the object of class
1
Enter the two operands using constructer and perform arithmetic operations (+, -, *, /) on them and display the result.
2
To enter any number and find its factorial and display it using constructor
3
To demonstrate the use of parameterized constructor.
4
To demonstrate the use of default constructor for the object of class
5
Program to illustrate the copy constructor for the object of class.
6
To find largest of three members using constructors and then use destructors at the end of program
7
To find biggest of the use friend function using inline function
8
To demonstrate the use of friend function using inline function
9
To find largest of two numbers using common friend function
10
To demonstrate classes & pointers.
11
To simulate saving account processing in a bank using constructors also use destructors at the end of the program
12
To generate Fibonacci series using copy constructor
13
Write a program to find the sum of two entered complex numbers from two different classes and display the sum using a common friend to two classes.
14
Write a C + + program the activity for 20 salesman each deals in separate product and is assigned an annual target at the end of the month his monthly sales is adds in to the sale till date at the end of the year his commissions is calculated as follows if sales made is more than target then the commission is 25% of the extra sales made + 10 % of the target if sales made is equal to the target then the commission is 10% of the target otherwise commission is zero.
Home
|
About Us
|
Portfolio
|
Services
|
Career
|
Contact Us
|
Industrial Training
|
Achievement