Object as Function Argument | C++ Programming | In Hindi
Vložit
- čas přidán 10. 09. 2024
- Object as Function Argument | C++ Programming | In Hindi | Tutorial #43
Hi All, Welcome all of you to the video series of C++ Programming. Like C, Java and Python, I will upload all the videos of C++ from Basic to Advanced.
In this video, I have explained array of object. This simply means that in the same way you can create an array of integer, you can also create an array of object which will be referred to as Array of Object.
============================================================
Use my code "codeitup" to get 10% discount
Career as a Developer: unacademy.com/...
Top Interview Questions: bit.ly/Unacade...
============================================================
Link to Previous Video: • Array of Object | C++ ...
Link to next video: • Friend Function in C++...
=======================================================================
CODEITUP PLAYLISTS
1. C Programming Playlist: www.youtube.co....
2. C++ Programming Playlist: www.youtube.co....
3. Java Programming Playlist: www.youtube.co....
4. Python Programming Playlist: www.youtube.co....
5. CBSE Class 12 (CS) Python Playlist: www.youtube.co....
6. CBSE Class 12 (IP) Playlist: www.youtube.co....
7. CBSE Class 11 (CS) Playlist: www.youtube.co....
8. CBSE Class 10 (IT): www.youtube.co....
9. Networking Playlist: www.youtube.co....
10. MySQL Playlist: www.youtube.co....
11. Web Designing: www.youtube.co....
12. NumPy Playlist: www.youtube.co....
13. Computer Fundamental Playlist: www.youtube.co....
14. ONE SHOT C Playlist: • C Programming | One Sh...
=======================================================================
Telegram Channel: t.me/codeitupl...
Facebook Group: / 21673. .
Instagram: t.me/codeitupyt
Facebook Group: / 21673. .
Facebook Page: / codeitup-104. .
Website: codeitup.in
Join this channel to get access to perks: www.youtube.co....
=======================================================================
Tags Used:
codeitup
codeitup c++
c++ tutorial
c++ tutorial in hindi
reverse of a given number
c++ tutorial for beginners
class and object
object as function argument
class
object
concept of class and object
programming using class & object
how to write program using class and object
writing program using class and object
program exercise using class and object
class and object programming
questions with class and object
odd even
max min program
using class & object
codeitup c++
c++ tutorial
c++ tutorial in hindi
c++ tutorial for beginners
class and object
class
object
writing basic loop programs using class & object
concept of class and object
programming using class & object
how to write program using class and object
writing program using class and object
program exercise using class and object
class and object programming
questions with class and object
odd even
max min program
using class & object
#codeitup
#c++
#classandobject
Hello sir, C++ ka course jald se jald complete kijiye, aapke sabhi video bahut achhe h ...
Sir can you please create a real life project based on C++ OOPs concept so that we can understand its implementation in real life.
I really love your style of teaching and I would be really thankful if you create a project based on C++ OOPs concept
Anand tumhari videos dekh kr to Anand hi a jata ha hyyyyyyyyyyyyyyyy🥰🥰🥰🥰🥰🥰🥰
🙂👍
Thank you so much Sir
Bundle of prayers for you❤ ALLAH bless you
Thanks & most welcome dear!
i always watch your video to understand after finishing my class.
Glad to hear that!
Sir please complete the c++ tutorial as soon as possible , sir I humble request to you please 🙏
Very nice explanation
Thanks Siddharth!
concept clarity 100%
😊👍
Thank you so much sir😊
// above eg correct logic
#include
#include
using namespace std ;
class time1
{
int m,h ;
public:
void read()
{
couth;
}
void display ()
{
cout
bhay you tube mai compiler ni hai ise chlane k lie :_)
🤣🤣
Please upload more c++ videos
Bhaiya you are too good ☺🙂🤗
And your explanation is super super good😎😄
Thanks a lot .
Well please tell aap kia karte hai?
👍 best teacher
Plz sir c++ video banavo
Awesome tutorial sir,
Thanks Abhay!
sir im class 11th student can i also join your classes ?(python)
Plz sir c++ complate fast karavo..
I love your way of teaching
Thanks!
thanks
Welcome!
nice teaching style
Osm ❤
😊
cout
Sir aage ki vdo jaldii dalo plzzzz
Sir ye logic muje galat lagta hai
Agar user first minute input me 10 and next me 40 likh de too minute me 10 ayega lekin vha par 50 ana chahiye
Please correct it if it is wrong
no agar 10 or 40 likh kar inko pehly plus karo to 50 ae ga then 50%60 hoga and modulus right to left hota hai matlab 60 / 50 hoga jis ka remainder 50 hi ata hai q ky 60 bara hai woh aik bar bhi devide nhi ho sakta agar 50 ki jgha 70 hota hai to tab answer 10 ata hai
you are awesome sir
❤🔥
Sir jaldi aur videos upload kare na
Please sir, c++ ke sabhi video upload kijiye
Pta ni bro kyu ni kr rahe hai aage ki video upload
Mai bahut confuse hu
Ab kaha se kre age ki class
Sir upload c++ more videos
Perfect
😊
Sir what is the difference between passing object as argument and passing obj as function argument
It seems there might be a slight misunderstanding in your question. However, I'll provide explanations for both possible interpretations:
1. **Passing Object as an Argument:**
When you pass an object as an argument to a function, you are essentially making a copy of that object and passing the copy to the function. This is known as passing by value. Any modifications made to the object inside the function will not affect the original object.
class MyClass {
// ... class members ...
};
void modifyObject(MyClass obj) {
// Modify the copy of 'obj'
}
int main() {
MyClass myObj;
modifyObject(myObj); // Pass by value
// 'myObj' remains unchanged
return 0;
}
```
2. **Passing Object Reference (or Pointer) as a Function Argument:**
When you pass an object reference (or a pointer) as a function argument, you are passing a way to access the original object's data. Any modifications made to the object inside the function will affect the original object.
class MyClass {
// ... class members ...
};
void modifyObject(MyClass& obj) {
// Modify the original 'obj'
}
int main() {
MyClass myObj;
modifyObject(myObj); // Pass by reference
// 'myObj' has been modified
return 0;
}
```
In the second case, the function receives a direct reference to the original object, allowing it to modify the object's data. This is more efficient in terms of memory and processing time compared to passing by value.
Additionally, if you're passing a pointer to an object, the function can modify the object using the pointer, similar to passing by reference.
It's important to choose the appropriate method based on your needs. Passing by value creates a copy of the object, which is safe but less efficient for large objects. Passing by reference or pointer allows the function to directly modify the original object, which is more efficient but requires careful consideration to prevent unintended modifications.
best explanation ever 🥰🥰🥰🥰
Thank you!
you have a cute smile
😊
Thankyou sir
Always welcome😊
14:04
Sir
Mene aapke channel se java or python pdii h
Lekin code hone me problm aari h😭😭😭
👍👍👍🙏🙏🙏🎉🎉nice
🙂
Bohut accha
😊
Sir aage ke videos bhi upload Kardo sir maibtech kar raha hu mujhe jald se jald sikhna hai c++ sir agar aapke pas koi recorded lectures ho yaphir paid courses to batao hame i am ready to buy. Agarnhi hai to sir c++ ke video jaldi se jalde upload karo sir please sir it's urgent ur way of teaching is awesome that's why I am requesting
Ye h aur m kaha se aa gaye third object Mai hai ji jab function getdata call hi nahi hua to aaya kaise kuch to batao
Please upload more C++ Video
C++ ma Live test and advanced level tak video banavo
Sir ham getdata ke function argument calling time me sting ki value kaise pass kare
Sir polymorphism and inheritance e bnao please
sir aap using namespace ka estemaal kyu ni kareee
standard function
When he said chaliye i said suru karte hai.
😂😂
😅
Time is type so not use as class name
sir operator overloading kya h
Plz sir.. python ni already playlist 6.
object as argument how it work in python
Sir pls jaldi jaldi laaao na video 😑
class khatam kaha ho raha hai isme
please reply sir
Paid course liya h kya kisi ne sir ka
#include
using namespace std;
class Time
{
int h,m;
public:
void getdata ();
void putdata (Time, Time );
void display ();
};
void Time:: getdata ()
{
coutm;
}
void Time:: putdata (Time t1,Time t2)
{
h=(t1.m+t2.m)/60;
m=(t1.m+t2.m)%60;
h=h+t1.h+t2.h;
}
void Time:: display ()
{
cout
Sir this my second comments to you but you are not replying please complete the c++ tutorial sir please 👋👋👋👋👋👋
Very soon dear
Yes sir I am also waiting for this playlists 🙏🥺🥺