Комментарии:
But will returning a pointer be of any use since memory allocation to local variables of function will get deallocated after function exits , thus pointing to that location will be useless
ОтветитьDo series similarly for java programming Mam
ОтветитьThanks mam
ОтветитьIf a is stored in stack memory of the returnPointer function then how it's not getting deleted when control is reaching out of this function
ОтветитьYour voice Is so cute
ОтветитьHow to return anything from a C/C++ function like a string, or, array, int, or pointer. Please read on.
Usually, a function can only return a single value, using the return mechanism. If you try to return more than one value from a function, only one value will be returned that appears at the rightmost place of the return statement. However, you can return multiple values from the function using the pointer, array, or structure.
Using Pointers
You can use pointers to return more than one value from a function by passing pointers as function parameters and use them to set multiple values which will then have visibility in the caller function.
Using Array
If you want to return multiple values of the same data type from a single function, then using an array is best suited because when an array name is passed as an argument then its base address is passed to the function so whatever changes made to the array is changed in the original array.
Using Structure
Another way to return multiple values from a function is by using structures. Structure is a user-defined datatype in C that can hold several datatypes of the same or different types. The idea is to create a structure variable containing all required data types as its members and return that from the function. We can then retrieve the values from the structure variable inside our caller function.
Quite tricky but you did justice to it.
Thanks from Nigeria 🇳🇬
Why a is treated as a pointer here not as an array?
Ответитьthank you mam.😊
ОтветитьMaam then why you are not writing it as pointer in the function defination part ( int * p) you are writing it as (int a [ ]) why so.. please explain..?I have the screenshot to help you understand better my doubt but I cant upload it here due to non-availability of options
ОтветитьHi mam,I have not clrafied y we cannot do a=a+2 , as per my understanding if we want to access the third element in array a we can do a[2],and other way may be a=a+2;
if possible could you please give an example to get this
Superbly cleared concept!!! U just nailed it!!!! In love with ur sessions.....
ОтветитьBest channel for learning c language
ОтветитьThis was a very important concept, thank you for covering this!
ОтветитьBeautiful Concept cleared!..
Ответитьplease upload c programming notes those written by you mam
Ответитьthank you so muv\ch dear mam usefull for all those unable to pay......god bless you mam ....
Ответитьapne unacademy ka advertisement krne ke kitne rupay liye hai???
ОтветитьSo in the series of c programming 🤣🤣🤣🤣🤣same line mam gjb
ОтветитьMam now we are a family of a half a million can you imagine all of us standing in front of you in a big ground or auditorium how would it feel like ???
ОтветитьMam please make video on how to run programmes in laptop because I am begginer plz mam
ОтветитьVery very thank you madam your video very very usefulness 🤗🤗🤗🤗🤗😊😊😊😊😇😇 I studied B.E cyber security and gate exam your videos for very useful Jenny madam
ОтветитьGood mam
Love you mam
Mam How can i join iam10th but i love this leaning
ОтветитьMa'am please start core java 🥺
Ответитьmam plzzz use high resolution camera
ОтветитьYour my crush ma'am 😊☺️☺️☺️☺️🥰🥰🥰
ОтветитьMa'am please send notes for us
ОтветитьMam which book is Good for begginer in c
ОтветитьWhich book is good for c beginning??
ОтветитьCan also find mam ji
ОтветитьLove the way you teach 💐❤️❤️❤️
ОтветитьMa'am, you are more consistent than Thugesh!😅
ОтветитьGood evening mam
Ответитьgood evening mam. 🙏🙏
ОтветитьMadam I need tamilnadu computer trb exam MCQ
ОтветитьMaam please start structures
And unions 😀
❤❤❤😘
ОтветитьEveryone is first here
Until they refresh 😂😂😂😂😂
You are amazing mam❤️❤️❤️❤️
ОтветитьSeventh comments heart plz🤗
ОтветитьGive your number
ОтветитьCourse fees please
ОтветитьHello mam
ОтветитьSecond view
Ответить