DCO-312 Practical File
DCO-312 Practical File
(DCO-312)
Submitted to:
Dr. Sunil & Ms. Farah Jamal Ansari
Assistant Professor
Submitted by
Student Name SHAYAN AHSAN
Roll No.:20DCS048
Semester: III SEMESTER
PRACTICAL DETAILS
Practical Practical Name Date of Date of Marks/ Teacher’s
No. Performance Checking Grades Signature
1. 9th Sept,2021
WRITE PROGRAMS IN
C++ TO IMPLEMENT
VARIOUS CONTROL
STATEMENTS
2. Write the C++ programs to 23rdSept,202
understand Structure 1
3. Write the C++ program to 23rd
understand functions Sept,2021
4. Write a program in C++ to 23rd Oct,2021
Understand Pointer
Arithmetic
5. Write Programs in C++ to 29th
Understand different
Sept,2021
function call mechanism.
a. Call by Value b. Call
by reference
6. Write a program in C++ to 29th
understand classes and Sept,2021
objects
7. Write a program in C++ to 20th Oct,2021
understand inline function.
8. Write a program in C++ to 20th Oct,2021
understand Constructors &
Destructors.
9. Write a program in C++ 20th Oct,2021
using classes to
demonstrate the Use of
“this” Pointer.
10. Write Programs in C++ to 14thNov,202
Implement all types of 1
Inheritance.
11.
12.
15.
PROGRAM 13: To Understand Friend Function &Friend Class
INPUT
#include<iostream>
using namespace std;
class Temperature{
private:
int celcius;
public:
Temperature(){
celcius=0;}
friend int temp(Temperature);
};
int temp(Temperature t)
{
t.celcius=52;
return t. celcius;
}
int main(){
Temperature tm;
cout<<"\n Temperature in Celcius:"<<temp(tm);
return 0;
}
OUTPUT
Temperature in Celcius:52