BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

Register FAQ Community Calendar New Posts Navbar Right Corner
HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 3rd Semester > Object Oriented Programming

Object Oriented Programming By Mam Sidra Malik


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-09-2008, 02:53 AM
.BZU.'s Avatar


 
Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,693
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
lectures Use of Function in C++ 1st lecture by Mam...

Madam nay Yeh wali file Compile ki thei..
We can understand the main concept of Functions in C++ Language by using this simple program developed by the mam Sidra in the class room


Code:
#include <iostream>
#include <stdio.h>
using namespace std;
void function1()
{
	cout<<"this is function1"<<endl;


}
void function2(int var1,float var2,char var3)
{
	cout<<"this is function2"<<endl;

}
int function3()
{

	cout<<"this is function3"<<endl;
		return 100;

}
float function4()
{

	cout<<"this is function4"<<endl;return 100.5;
}
float function5(float var4)
{

	cout<<"this is function5"<<endl;
	return 100.5;
}

struct dis
{
	int f;
	int inc;

};





void function6(dis d)
{

	cout<<"this is function6"<<endl<<d.f<<endl<<d.inc<<endl;
	
}
int main()
{
	int var;float var2;


	dis d1={22,22};

	function1();
	function2(25,25.0,'b');
	var=function3();
	cout<<"this value is returned by function3 "<<var<<endl;
	var2=function4();
		cout<<"this value is returned by function4 "<<var2<<endl;
	var2=function5(100.5);
		cout<<"this value is returned by function5"<<var2<<endl;


		function6(d1);
	return 0;
}


__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
Reply

Tags
1st, c++, function, lecture, lectures, mam


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lecture 11 Moment Generating Function bonfire Statistics and Probability 0 15-04-2011 01:22 AM
Lecture 8-10 Data Mining Concepts and Techniques Complete lecture .BZU. Dataware Housing & data mining 0 20-12-2010 06:28 PM
What is Function in C++ Fully explained .BZU. Object Oriented Programming 0 21-10-2008 10:31 PM
Insert function of String in C++ BSIT07-01 Object Oriented Programming 1 13-10-2008 11:50 PM
Function BSIT07-01 Math for IT-I 1 16-11-2007 11:42 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 05:08 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.