C_98 Return a String from a Function in C | C Language Tutorials

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 98

  • @chandanagv6144
    @chandanagv6144 3 ปีที่แล้ว +102

    Hello ma'am,
    I'm currently in Final year B. Tech CSE.
    I have been a silent follower since 3 years.
    But now I'm writing this comment to tell you that I got placed in a company with 8LPA.
    The DBMS playlist is the reason I could answer so many questions in exams and interviews.
    I'm forever great full to you ma'am.
    Thank you for doing what you are doing. ❤
    Tonnes of Love ❤

  • @shashinikarunarathna3139
    @shashinikarunarathna3139 3 ปีที่แล้ว +18

    I am 🇱🇰 , i like your teaching style mam

    • @mjpavithra7710
      @mjpavithra7710 3 ปีที่แล้ว

      I also like her 🥺😘😍😍

  • @kinegiap-kgpy5312
    @kinegiap-kgpy5312 ปีที่แล้ว +6

    Great! I cannot expect that the word "static" can change all my code^^ keep it fresh, thank you

  • @387_debashisdhali8
    @387_debashisdhali8 2 ปีที่แล้ว +3

    Didi you are best teacher ever seen.Thank you so much.Take love from Bangladesh.

  • @Maddie05007
    @Maddie05007 หลายเดือนก่อน

    THIS WAS THE MOST *PACKED* LECTURE I EVER WATCHED UNTIL NOW IN C.

  • @chaitanyakumar3917
    @chaitanyakumar3917 3 ปีที่แล้ว +5

    Mam why teachers like you don't exist in universities......ithna clear explanation.... ithna command on language...I always wonder about your teaching mam .. it's serious...I swear mam....

    • @artography0077
      @artography0077 2 ปีที่แล้ว

      They are also teaches well but they are bound to complete syllabus within given time.... eventually they more works on to complete syllabus rather than understanding.. That's the reason...!!! 🌱✨🌿🌷

  • @SandipBhattacharya
    @SandipBhattacharya 2 ปีที่แล้ว +1

    How to return multiple values from a C/C++ function? It can be any value like int, float, double, string, array, structure., etc. Read one.
    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.

  • @jeanrioux8750
    @jeanrioux8750 ปีที่แล้ว

    My question is about your explanation of the example beginning around 12:00 (video C_98). I am wondering why the string "Jenny" would be in the stack. I would rather believe that only the pointer str is in the stack. When the function returns str, it is the pointer that is not accessible anymore and, consequently, the string. I know the effect is the same, but my question is: "Are strings always stocked in an area other than the stack or can they be stocked in the stack also?". Thanks for your time.

  • @narendernari8996
    @narendernari8996 2 ปีที่แล้ว +1

    this is my first videos from this playlist i understand 50% only....

  • @rajeshnayak3204
    @rajeshnayak3204 2 ปีที่แล้ว +2

    char *str = "jenny"; jenny is stored in initialized read-only memory which is the part of data segment not in heap memory (your's comment)

  • @misturaojulari9707
    @misturaojulari9707 ปีที่แล้ว +1

    This section cleared up a lot of confusion. Thanks, ma'am

  • @jaijaijaijai123
    @jaijaijaijai123 3 หลายเดือนก่อน

    @14:49 it's not the heap area but the read only memory region where "Jenny" is stored. str is pointer in stack memory pointing to that address of that string and that address is returned. Heap memory is for dynamic allocation.

  • @venkatapathia871
    @venkatapathia871 2 ปีที่แล้ว +4

    Mam explain me the difference among Static fun ,Const fun and volatile fun and also Static variable,const variable and volatile variable . What will happen with them , when do we go for them in programming

  • @JSR003
    @JSR003 3 ปีที่แล้ว +6

    Mam you're teaching is really understandable. Can you please start JAVA class. I searched and find a cls but I can't understand that so can u pls consider this please mam start java cls soon.

  • @vijayyadav7528
    @vijayyadav7528 3 ปีที่แล้ว +9

    Because of your beauty i learned entire c + 😂😂

  • @jyotirani8232
    @jyotirani8232 3 ปีที่แล้ว +4

    Good evening mam. 🙏🙏

  • @kulkarnisoham
    @kulkarnisoham 3 ปีที่แล้ว +7

    Omg this is the first vdo of this playlist where I really didn't get it 😐😶

  • @Itz_Armaan03
    @Itz_Armaan03 2 ปีที่แล้ว +1

    Mam I am using turboo c and c language in mine program it change value jeeny to zeeny timeline 16:35

  • @aparnamane4899
    @aparnamane4899 2 ปีที่แล้ว +1

    clear all points thank you mam

  • @simonepavan4162
    @simonepavan4162 3 ปีที่แล้ว +2

    Very clear thank You.

  • @swayamgupta3188
    @swayamgupta3188 2 หลายเดือนก่อน

    18:23

  • @aniketkumar3126
    @aniketkumar3126 3 ปีที่แล้ว +1

    Great explaination mam ❤❤❤

  • @santhosh-nw7cm
    @santhosh-nw7cm 3 ปีที่แล้ว +1

    thanks for teching in english

  • @walidoulondon8107
    @walidoulondon8107 3 หลายเดือนก่อน

    char *str="jenny"; gonna be stored in ROM not heap memory the heap memory is allacated only for dynamic memory allocation when using function malloc or calloc thank you

  • @HimanshuSingh-mt4tg
    @HimanshuSingh-mt4tg 3 ปีที่แล้ว

    Mam Your eye is very nice😊

  • @VinayKumar-cl8pm
    @VinayKumar-cl8pm 2 ปีที่แล้ว

    Mam pls start java course
    You are great teacher.

  • @blvckstar777
    @blvckstar777 2 ปีที่แล้ว +1

    Which IDE do you suggest best?

  • @priyankapaul7077
    @priyankapaul7077 2 ปีที่แล้ว +1

    Maam, why didnt you write *str instead of str in main function while you are printing the str? As because we know *str means indirection, by doing we can access the value.. I am little confusion here..!! If u help me,it will be very helpful to me!

  • @ankita6327
    @ankita6327 3 ปีที่แล้ว +2

    Maam could you please start a course on core java

  • @Daniel-tx2vt
    @Daniel-tx2vt ปีที่แล้ว +1

    My problem is i want a function to take a string input, return that string, to main and use it in other functions to finish my program and every-time i either get a garbage value, segmentation fault or compile error. No matter what i do😢. And doing str = getString(); in main just gives a compile error

  • @rohitrox7286
    @rohitrox7286 3 ปีที่แล้ว

    2:47

  • @shivendra3019
    @shivendra3019 3 ปีที่แล้ว +3

    @Jenny's Lectures, Which IPL team you support mam?

  • @ankammaraochintala2509
    @ankammaraochintala2509 3 ปีที่แล้ว +1

    Thank you madam

  • @llo.welc_me
    @llo.welc_me 2 ปีที่แล้ว +1

    More more videos on pointers , string

  • @sole_beatzz7344
    @sole_beatzz7344 3 ปีที่แล้ว +3

    Mam please start python classes

  • @dangerdevilgamers5244
    @dangerdevilgamers5244 3 ปีที่แล้ว

    Mam u r looking awesome

  • @prathudwivedi1246
    @prathudwivedi1246 3 ปีที่แล้ว +2

    I have one doubt as it is returning 1st character address but it is printing full string

    • @710_satyamkumar9
      @710_satyamkumar9 3 ปีที่แล้ว +1

      Ye bro I am also having the same doubt 🧐

    • @ishansingh6241
      @ishansingh6241 2 ปีที่แล้ว +3

      Yes because we using %s not %c bro

    • @sanjays7255
      @sanjays7255 2 ปีที่แล้ว +1

      Becuz of its stores at contagious memory location

  • @ramnathrohit5687
    @ramnathrohit5687 2 ปีที่แล้ว +1

    char *str ="ram"; ram string is in code section

  • @rounaksharma4465
    @rounaksharma4465 3 ปีที่แล้ว +1

    Mam can u make on oops concepts too please?

  • @Raam1827
    @Raam1827 ปีที่แล้ว

    If i used const... In function definition declaration chaged to const and also in main fun variable declaration also changed to const.... But in case i used static there is no need to change these areas why????

  • @Random69696
    @Random69696 2 ปีที่แล้ว

    In the Case of Call by Reference we are passing the variable's address or pointers of main function to User Defined Functions....and we can't Return variable's address or pointers Normally to main function because they are local..... So while passing arguments ,Why not UD functions considering that arguments as local ???

  • @KamatamsandeepKumar-
    @KamatamsandeepKumar- 3 ปีที่แล้ว

    Thanks 😊mam

  • @vigneshreddy1213
    @vigneshreddy1213 2 ปีที่แล้ว

    Mam when we use return Jenny we can modify it I runned it on my pc it prints zenny

  • @maduabewardana7900
    @maduabewardana7900 3 ปีที่แล้ว

    Thank you mam

  • @katamabhishek8844
    @katamabhishek8844 3 ปีที่แล้ว +2

    Can u pls start Python mam

  • @xDeadlyWarriorX
    @xDeadlyWarriorX 2 ปีที่แล้ว

    char *strInput() {
    char *palavra;
    scanf("%s", palavra);
    return palavra;
    }
    char *caracter;
    char *word;
    caracter= strInput();
    word= strInput();
    For some reason, word is being ignored. Help ?

  • @yessk07
    @yessk07 3 ปีที่แล้ว

    First comment from nepal

    • @SachinKumar-wx5sn
      @SachinKumar-wx5sn 3 ปีที่แล้ว

      Not 1st comment...Jhoot bol rha h....m 2nd hu....1st koi or h....

  • @trendmoveever6072
    @trendmoveever6072 3 ปีที่แล้ว +1

    Mam dynamic memory allocation pda dijyee

  • @Logan-ig7sm
    @Logan-ig7sm ปีที่แล้ว

    When I declare string like this char str[ ] and str=display() then error is come that string is not assignable to display() then how char*str and char str [ ] can be same?

    • @Saravananfe
      @Saravananfe 11 หลายเดือนก่อน

      because if its internal memory address

  • @SauravKumar-lq6hr
    @SauravKumar-lq6hr 3 ปีที่แล้ว

    Thanks mam

  • @tej8789
    @tej8789 3 ปีที่แล้ว

    Hello mam make a video series on C#

  • @TopRTelugu
    @TopRTelugu 3 ปีที่แล้ว

    Your my crush ma'am 💕😘❤️❤️❤️

  • @rihirk8559
    @rihirk8559 ปีที่แล้ว

    can any one explain at 14:30

  • @vigneshreddy1213
    @vigneshreddy1213 2 ปีที่แล้ว

    We can modify it to mam

  • @physiotherapymedico6148
    @physiotherapymedico6148 3 ปีที่แล้ว

    Mam plzz make video on applied technique multimedia plzz reply me 😭😭😭😭😭😭

  • @nonamedelete9132
    @nonamedelete9132 2 ปีที่แล้ว

    Don't be fool by the rocks that I got, I'm still Jenny from the stack.

  • @Mehedihasan-rahat
    @Mehedihasan-rahat 2 หลายเดือนก่อน

    Why in this context there needs to be considered static and heap memory...since array is referenced type variable so from global point it should access automatically 😮😮😮very confusing topic requesting to elaborate the discussion more😮😮😮😮plz

  • @jawaddude
    @jawaddude 3 ปีที่แล้ว

    Plz make video 1080p or upper.

  • @general_study86
    @general_study86 3 ปีที่แล้ว

    Mam please lecture on scilab coding

  • @anujkumarrai3949
    @anujkumarrai3949 3 ปีที่แล้ว

    Mam jaise function ko padya hi pls recursion mam

  • @sanjays7255
    @sanjays7255 2 ปีที่แล้ว

    Can anybody tell me plz ,why it's read only in the function display ()

  • @nizampeerzada3295
    @nizampeerzada3295 2 ปีที่แล้ว

    How we will replace string using function.

  • @himanshuvishwakarma8
    @himanshuvishwakarma8 3 ปีที่แล้ว

    I am indian ✌️

  • @Lucky-z8e
    @Lucky-z8e 5 หลายเดือนก่อน

    Not getting output on c++...

  • @Dev-mg1oj
    @Dev-mg1oj ปีที่แล้ว

    thats why i coming in this video

  • @tapaskumardey650
    @tapaskumardey650 3 ปีที่แล้ว

    This particular lecture is very tough 😑😑

  • @shandeshchaudhary-ps1tz
    @shandeshchaudhary-ps1tz 6 หลายเดือนก่อน

    I would rate her lectures 3/10

  • @pookkuttifamilyvlog6057
    @pookkuttifamilyvlog6057 3 ปีที่แล้ว

    Mam iam10thstd how can i join javascipt please help me mam age 37 life very poor situations

  • @gtechninja
    @gtechninja 2 ปีที่แล้ว

    💯💯💯💯💯💯💯💯💯💯💯

  • @makecoffee6157
    @makecoffee6157 3 ปีที่แล้ว

    That’s ancient c++. Not really relevant now. Teach c++ 17 features for the people

  • @KamatamsandeepKumar-
    @KamatamsandeepKumar- 3 ปีที่แล้ว

    Hi mam

  • @shivansh709
    @shivansh709 2 ปีที่แล้ว +1

    Very poor lecture. Did not get anything

  • @SachinKumar-wx5sn
    @SachinKumar-wx5sn 3 ปีที่แล้ว

    Helo mam

  • @A....03
    @A....03 15 วันที่ผ่านมา

    Very Confusing this lecture is

  • @ShashvithChowdhary
    @ShashvithChowdhary 3 ปีที่แล้ว

    hi

  • @ShashvithChowdhary
    @ShashvithChowdhary 3 ปีที่แล้ว

    hi mam please reply me

  • @kasti30
    @kasti30 3 ปีที่แล้ว

    Please tell me please please

  • @kasti30
    @kasti30 3 ปีที่แล้ว

    Kya aapka शादी हो गया है 😍😍❤️❤️

  • @vishalkamble7610
    @vishalkamble7610 3 ปีที่แล้ว

    Mam mujse shadi karogi kya?