C_99 Returning Pointer from Function in C | C Language Tutorials

C_99 Returning Pointer from Function in C | C Language Tutorials

Jenny's Lectures CS IT

2 года назад

66,920 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@NewGamer-do4jk
@NewGamer-do4jk - 29.11.2023 01:36

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

Ответить
@gowthamselvaraj7793
@gowthamselvaraj7793 - 12.09.2023 16:22

Do series similarly for java programming Mam

Ответить
@abdulrahimjalloh363
@abdulrahimjalloh363 - 25.08.2023 01:34

Thanks mam

Ответить
@SN-edits4u
@SN-edits4u - 31.07.2023 02:23

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

Ответить
@reyazmir9259
@reyazmir9259 - 17.03.2023 13:26

Your voice Is so cute

Ответить
@SandipBhattacharya
@SandipBhattacharya - 14.01.2023 06:49

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.

Ответить
@petereziagor4604
@petereziagor4604 - 09.11.2022 15:42

Quite tricky but you did justice to it.
Thanks from Nigeria 🇳🇬

Ответить
@payelkumbhakar6337
@payelkumbhakar6337 - 21.09.2022 15:36

Why a is treated as a pointer here not as an array?

Ответить
@aparnamane4899
@aparnamane4899 - 26.07.2022 18:32

thank you mam.😊

Ответить
@chiradeepbhattacharya1466
@chiradeepbhattacharya1466 - 22.07.2022 19:33

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

Ответить
@vanik2428
@vanik2428 - 20.04.2022 16:33

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

Ответить
@shikhapatro7427
@shikhapatro7427 - 29.03.2022 15:55

Superbly cleared concept!!! U just nailed it!!!! In love with ur sessions.....

Ответить
@arethelaabhilash9687
@arethelaabhilash9687 - 08.03.2022 21:54

Best channel for learning c language

Ответить
@nishyu9101
@nishyu9101 - 19.02.2022 06:56

This was a very important concept, thank you for covering this!

Ответить
@avigupta9683
@avigupta9683 - 31.01.2022 10:56

Beautiful Concept cleared!..

Ответить
@gabbarjadhav2293
@gabbarjadhav2293 - 16.01.2022 20:18

please upload c programming notes those written by you mam

Ответить
@gabbarjadhav2293
@gabbarjadhav2293 - 16.01.2022 20:18

thank you so muv\ch dear mam usefull for all those unable to pay......god bless you mam ....

Ответить
@vivekjaiswal6382
@vivekjaiswal6382 - 08.01.2022 09:33

apne unacademy ka advertisement krne ke kitne rupay liye hai???

Ответить
@hitechaaso..5838
@hitechaaso..5838 - 07.11.2021 18:37

So in the series of c programming 🤣🤣🤣🤣🤣same line mam gjb

Ответить
@rudrapatel48
@rudrapatel48 - 29.09.2021 07:21

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 ???

Ответить
@ishajain6833
@ishajain6833 - 26.09.2021 11:02

Mam please make video on how to run programmes in laptop because I am begginer plz mam

Ответить
@palanikanuu5847
@palanikanuu5847 - 25.09.2021 16:55

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

Ответить
@dangerousdesert
@dangerousdesert - 25.09.2021 09:39

Good mam
Love you mam

Ответить
@pookkuttifamilyvlog6057
@pookkuttifamilyvlog6057 - 25.09.2021 05:25

Mam How can i join iam10th but i love this leaning

Ответить
@sanjanapanwar3844
@sanjanapanwar3844 - 24.09.2021 23:58

Ma'am please start core java 🥺

Ответить
@m.shivakumar2815
@m.shivakumar2815 - 24.09.2021 21:47

mam plzzz use high resolution camera

Ответить
@TopRTelugu
@TopRTelugu - 24.09.2021 20:34

Your my crush ma'am 😊☺️☺️☺️☺️🥰🥰🥰

Ответить
@tjayalakshmi5610
@tjayalakshmi5610 - 24.09.2021 20:08

Ma'am please send notes for us

Ответить
@manjunathdesai5127
@manjunathdesai5127 - 24.09.2021 19:22

Mam which book is Good for begginer in c

Ответить
@manjunathdesai5127
@manjunathdesai5127 - 24.09.2021 19:13

Which book is good for c beginning??

Ответить
@sachinlodhi7978
@sachinlodhi7978 - 24.09.2021 18:50

Can also find mam ji

Ответить
@maheshk1865
@maheshk1865 - 24.09.2021 18:42

Love the way you teach 💐❤️❤️❤️

Ответить
@kausikkar2587
@kausikkar2587 - 24.09.2021 18:36

Ma'am, you are more consistent than Thugesh!😅

Ответить
@muhammadwaseem7232
@muhammadwaseem7232 - 24.09.2021 18:35

Good evening mam

Ответить
@jyotirani8232
@jyotirani8232 - 24.09.2021 18:17

good evening mam. 🙏🙏

Ответить
@selvaperumalcomputerinstru4181
@selvaperumalcomputerinstru4181 - 24.09.2021 18:17

Madam I need tamilnadu computer trb exam MCQ

Ответить
@ankithkumar4705
@ankithkumar4705 - 24.09.2021 18:05

Maam please start structures
And unions 😀

Ответить
@govindarao331
@govindarao331 - 24.09.2021 18:04

❤❤❤😘

Ответить
@black_motivation4344
@black_motivation4344 - 24.09.2021 17:59

Everyone is first here
Until they refresh 😂😂😂😂😂

Ответить
@Amanpreetkaur16
@Amanpreetkaur16 - 24.09.2021 17:57

You are amazing mam❤️❤️❤️❤️

Ответить
@khajamohiddinmohammed7992
@khajamohiddinmohammed7992 - 24.09.2021 17:56

Seventh comments heart plz🤗

Ответить
@sunnysingh-ms1fx
@sunnysingh-ms1fx - 24.09.2021 17:56

Give your number

Ответить
@sunnysingh-ms1fx
@sunnysingh-ms1fx - 24.09.2021 17:56

Course fees please

Ответить
@sunnysingh-ms1fx
@sunnysingh-ms1fx - 24.09.2021 17:52

Hello mam

Ответить
@riyagupta1841
@riyagupta1841 - 24.09.2021 17:50

Second view

Ответить