C_69 C Program to Reverse a String | with strrev() and without strrev() function

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • In this lecture we will discuss a C program to Reverse a string with strrev() and without strrev() function.
    Best C Programming Tutorials: • Programming in C
    *********************************************
    Connect & Contact Me:
    Jenny's Lecture Hindi: / @jennyslectureshindi
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    Telegram Group Link: Jenny's Lectures
    telegram.me/je...
    *******************************************
    More Playlists:
    Programming in C Tutorials: • Programming in C
    C++ Tutorials for beginners: • Lec 1: How to Install ...
    Printing Pattern in C: • Printing Pattern Progr...
    Best Python Tutorials for Beginners: • Python - Basic to Advance
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Dynamic Programming: • Dynamic Programming
    Operating Systems tutorials: // • Operating Systems
    DBMS Tutorials: • DBMS (Database Managem...
    Tags:
    strings, string in c, what is string, c programming tutorials, c programming, best c programming tutorials
    #coding #strings #jennyslectures #cprogramming #clanguage

Komentáře • 190

  • @janiaskarova1793
    @janiaskarova1793 Před 2 lety +35

    Literally THE best teacher on CZcams!!!! Thank you so much for such a great explanation!!!!!!

  • @jeremiahmbugua3312
    @jeremiahmbugua3312 Před 6 dny +1

    Wonderful lecture. This is exactly the type of explanation I was looking for!!!!!

  • @petereziagor7379
    @petereziagor7379 Před rokem +7

    Wow, this is so powerful. First time seeing your video and I am 100% impressed. Thank you

  • @FB-fc2kg
    @FB-fc2kg Před 28 dny +1

    She knows what all to say, and what all details to include while to make it CRYSTAL CLEAR understanding to beginners. She steps at beginners level herself in order to deliver utmost. Heartfelt THANKS!!!!

  • @mohamedmire8646
    @mohamedmire8646 Před 2 lety +5

    I like this amazingly lecturer.
    with and with out the predefined functions.
    i have watched multiple others but they just show in way not both like this.
    you are my favourite keep going.

  • @999pubg3
    @999pubg3 Před 3 lety +16

    your way of teaching is awesome 🤩 if possible then plzz 🙏 make play list on html , css and java || it a humble request🙏 ||

  • @hariharan-yi8tf
    @hariharan-yi8tf Před 2 lety +4

    Tanx, I have started re-learning c programming being an opsimath bit difficult but u made my day🙌

  • @ShubhamKumar-tu9ji
    @ShubhamKumar-tu9ji Před 2 lety +5

    The way you teach is just awesome 👍
    Keep on working.

  • @madhavisinha6350
    @madhavisinha6350 Před 3 lety +26

    You are best mam

  • @adarsh7390
    @adarsh7390 Před 3 lety +3

    You are changing your teaching style👍👍

  • @ahmedkhalil3727
    @ahmedkhalil3727 Před rokem

    im ict teacher and its great that you teach me and sharing your knowledge
    i feel like you in classroom and ask me and get afraid :D and replay the part that i didn't understand it again to answer your question :)
    you are really genius !

  • @dailylifeandfeatures
    @dailylifeandfeatures Před 2 lety +2

    Thanks ❤️ for this masterpiece heart Fr0m Kashmir (Gulmarg) 😍

  • @techcode4714
    @techcode4714 Před 3 lety +6

    Thanks Mam for your great effort and gives us great lecturer.. ❣️

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @harshgoyal7114
    @harshgoyal7114 Před 3 lety +4

    Thankyou mam. You clear my most of problems.

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @aniketkumar3126
    @aniketkumar3126 Před 3 lety +5

    Lovely explaination Hats off🎩

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @prachirawat1835
    @prachirawat1835 Před 2 lety +1

    Best playlist for C language

  • @user-mv7dg5qy7c
    @user-mv7dg5qy7c Před rokem +4

    #include
    #include
    int main(){
    char str[30] = "Nikhil";
    int len = strlen(str);
    int j = len-1;
    int i=0;
    while(j > i){
    char ch = str[i];
    str[i] = str[j];
    str[j] = ch;
    j--;
    i++;
    }
    printf("%s",str);

    return 0;
    }

    • @RachitSrivastava69
      @RachitSrivastava69 Před 8 měsíci

      #include
      #include
      #include
      void main()
      {

      char s1[30];
      gets (s1);
      int l=strlen(s1);
      for(int i=l;i>=0;i--)
      {
      printf("%c",s1[i]);
      }
      }

    • @Achyutanand-vw9vf
      @Achyutanand-vw9vf Před 4 měsíci

      #include
      #include
      #include
      void main(){
      char str1[50]="India is great",str2[50];
      int l=strlen(str1),i,j=0;
      printf("Original string=%s
      ",str1);
      for(i=0;i

  • @manikantarajudhavala3543
    @manikantarajudhavala3543 Před 3 lety +7

    #inclde
    #inclde
    #inclde
    Main()
    { char s[20];
    printf ("
    enter a string ") ;
    gets(s) ;
    strrev(s) ;
    printf (the reverse string is%d, s)
    }
    OUTPUT:
    Enter a string
    The reverse string is inam
    Mani

  • @debojitacharjee
    @debojitacharjee Před 2 lety +3

    *REVERSING OF STRING IS NOT SWAPPING* - strrev() does swapping of characters but if a string can be printed in reverse order then it's also reversing. If the requirement is only for output then reversing a string without swapping is also correct. But why are you doing this with for loop if we can use strrev() for that?
    I have written a code to reverse the code without using the string header. Here is the code:
    // Program to reverse a string without using string.h header file
    #include
    int main()
    {
    char a[31], swap_a;
    int i, j, a_size, string_size = 0;
    for (i = 0; i < 30; i++)
    {
    a[i] = 0;
    }
    printf("Enter a word within 30 characters: ");
    scanf("%s", a);
    for (i = 0; a[i] != 0; i++)
    {
    string_size++;
    }
    for (i = 0, j = string_size; i < string_size/2; i++)
    {
    swap_a = a[i];
    a[i] = a[j-1-i];
    a[j-1-i] = swap_a;
    }
    printf("%s
    ", a);
    return 0;
    }

    • @ajayijohnson
      @ajayijohnson Před rokem +1

      Because some compilers wont see the strrev() function in the library. This way, one can write the function by one’s self and then use it throughout the program.

    • @debojitacharjee
      @debojitacharjee Před rokem

      @@ajayijohnson strrev() is defined in string.h header file and which compilers do you THINK don't SUPPORT this header file?

    • @ajayijohnson
      @ajayijohnson Před rokem

      @@debojitacharjee Yes! I know it’s in that header file string.h but then I’m also aware that it’s mostly available in windows system. I have tried to use this command in a Linux environment and the function strrev() and some other functions are not in the header file string.h. There peculiarities with different environment and in case one cannot find it, the algorithm can be written.

    • @debojitacharjee
      @debojitacharjee Před rokem

      @@ajayijohnson it's the problem with gcc compiler but that means compiling on Windows would make a program more code optimized. Using functions instead of custom code optimizes the overall LOC.

    • @aadhil9270
      @aadhil9270 Před rokem

      @@debojitacharjee online compilers

  • @VENUGOPALREDDY-
    @VENUGOPALREDDY- Před 3 lety +3

    Madam please make videos on python plzz
    I am a mechanical student but intrest to learn python when see u r way of teaching....
    Plzzzzzz plzzzzzzz plzzzzzz plzzzzzzz reply mam...❤️

  • @yogeesh_kulal02
    @yogeesh_kulal02 Před 4 měsíci +20

    Playback speed 1.5X😂

    • @aashishsingh6857
      @aashishsingh6857 Před 4 měsíci +4

      No bro 2x and at exam time yh bhi slow lagta h 🙂🙂

    • @yogeesh_kulal02
      @yogeesh_kulal02 Před 4 měsíci +2

      @@aashishsingh6857 if you have exam then. why are you reading comments 😂

    • @lamaalghanam2215
      @lamaalghanam2215 Před 3 měsíci +2

      @@aashishsingh6857 me right now😂

    • @sahar_sphere
      @sahar_sphere Před 28 dny

      For me, it’s 2x.

    • @PARTHA0609
      @PARTHA0609 Před 18 dny

      @@yogeesh_kulal02 2x

  • @harshvardhan8526
    @harshvardhan8526 Před 3 měsíci

    mam aapki wajh se muje programming easy lagni lagi hai

  • @user-mz6bm2zf9d
    @user-mz6bm2zf9d Před rokem

    As always miss ! you have a teaching talent , continue please ! god bless you

  • @AjeetKumar-mo6xt
    @AjeetKumar-mo6xt Před 3 lety +1

    Mam ! In every video You smile in the beginning and at the end only 😃😃
    I like that though ❤️

  • @SravanKumar-uc6qt
    @SravanKumar-uc6qt Před 3 lety +1

    Respected madam zi,
    Helping to strengthen to programme,

  • @_DharmeshTiwari
    @_DharmeshTiwari Před měsícem

    I dont know but loved this lecture and my fev topic ever ❤❤

  • @balajimukkara
    @balajimukkara Před 3 lety +1

    Mam ur teaching is very nice and easy to understand

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @pankhuri7002
    @pankhuri7002 Před rokem

    isme hm log for loop me agr change kr lete for(I=6;I

  • @tsm881
    @tsm881 Před rokem +1

    Very good explanation.. thanks 😊

  • @CricketingVloging
    @CricketingVloging Před 3 lety +2

    👍 Very helpful video Mam.

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @mabiormayiol-ey7yb
    @mabiormayiol-ey7yb Před 5 měsíci

    Your angel eyes are increasing my understanding

  • @pramodhkumart8881
    @pramodhkumart8881 Před 7 měsíci

    Best Explanation.. ever .🎉

  • @VikashSingh-fr1wm
    @VikashSingh-fr1wm Před 3 lety +2

    New viewer of your channel mam..

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @shyamsuratyadav655
    @shyamsuratyadav655 Před 3 lety +2

    Thank you so much ma'am ❤️

  • @RTBOSS
    @RTBOSS Před 3 lety +1

    Whenever you star UDF please explain it with some easy way because I was learned that before 5 time but steal confusing... 😵

  • @lokeshnehete6149
    @lokeshnehete6149 Před 2 lety +1

    Superb explained mam...

  • @hozefabharmal9885
    @hozefabharmal9885 Před 3 měsíci +1

    #include
    #include
    int main() {
    int len1;
    char s1[1000];
    printf("Enter your string : ");
    fgets(s1,100,stdin);
    len1 = strlen(s1);
    for(int i = len1; i>=0; i--) {
    printf("%c", s1[i]);
    } printf("

    ");
    return 0;
    }

  • @yadavji6724
    @yadavji6724 Před 3 lety +2

    Best of tha best teacher 😘😘

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @manveenkaur4878
    @manveenkaur4878 Před 3 lety +4

    mam in how many days this course will be complete (estimated time)??

  • @KULDEEPSINGHGMech-
    @KULDEEPSINGHGMech- Před rokem

    so awesome teaching really to much interested teaching way

  • @ShubhamSharma-sv5fe
    @ShubhamSharma-sv5fe Před 5 měsíci

    Greatly explain ma'am.......

  • @tanvibatham1101
    @tanvibatham1101 Před rokem +1

    such a great explanation

  • @tareqaziz8150
    @tareqaziz8150 Před 3 lety +1

    At first Thank you. I watch your lecture regularly, my question to you which camara you use? or camara brand and model name please mention this.

  • @masumborkar441
    @masumborkar441 Před rokem

    Ur 😊 explanation is just wow

  • @PKTECHIE26
    @PKTECHIE26 Před 3 lety +2

    Thanks🙏🙇

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @muskancharan7673
    @muskancharan7673 Před 2 lety +1

    Thank you so much ma'am 💖

  • @sidharthsinghania5931
    @sidharthsinghania5931 Před 3 lety +4

    1??it is an integer and string is character type array having \0 at the end, is it possible to include integer in it??? Just asking as I am having confusion

    • @pskpk258
      @pskpk258 Před 3 lety +3

      1 is not just integer
      '1' is treated as character also in C.
      For example, in print statements where you want to print a number or menu, we print as :
      printf("1.Option 1
      2.Option 2
      3.Option 3
      ");
      Here the numeric symbols are treated as characters.
      But in arithmetic (math) operations, the numeric symbols are treated as math numbers.
      Eg :
      int c= 5+3; // c=8 will be stored
      So we can use 1 as number and '1' as character
      So yes, you can include numbers in your strings too, where the number also will be treated as character.
      Note :
      //char ch=1; //wrong use
      char ch= '1'; //ch stores '1' as character
      printf("%c",ch); //will print 1
      int num=1;
      //int num='1'; //wrong use
      printf("%d",num); //prints 1
      num++; //correct
      //ch++; //wrong bcoz ch is character and addition is done only on numbers, not characters

  • @rajanitdep1702
    @rajanitdep1702 Před 3 lety +1

    Mam, Iam from Mass, still watching your vedios for understanding humen technology.

  • @nikhilguleria4313
    @nikhilguleria4313 Před 2 lety

    your logic in always great

  • @YogeshKumar-ur5oj
    @YogeshKumar-ur5oj Před 2 lety +1

    Mam you are a great teacher
    Could you tell you are studied from which IIT

  • @pradnyadukre6248
    @pradnyadukre6248 Před 3 lety +1

    Mam plz explain process structure of c.

  • @wwyou-we2283
    @wwyou-we2283 Před 2 lety

    thanks for discuss it.

  • @naninani7109
    @naninani7109 Před 2 lety

    Queen of c language

  • @meghasinha1706
    @meghasinha1706 Před 3 lety

    Thanks for your efforts mam

  • @menezes.d.191
    @menezes.d.191 Před 5 měsíci

    Tomorrow is my C program Lab practical exam and here I'm watching it now 👅

  • @truptiarade3193
    @truptiarade3193 Před 2 lety

    very very nice teaching learning mam

  • @shauryamusic7094
    @shauryamusic7094 Před 3 lety +2

    thank u mam

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @anshulsingh1265
    @anshulsingh1265 Před 3 lety +4

    Ma'am Can you explain your lectures using java??

  • @chandrakantsolanki1635
    @chandrakantsolanki1635 Před 3 lety +1

    Mam I fall in your eye

  • @Ahmad_raza77770
    @Ahmad_raza77770 Před 9 měsíci

    Very very thank you mam 🎉😊.

  • @leelakumarreddy6566
    @leelakumarreddy6566 Před 3 lety +1

    Mam I am very pure in maths
    even I don't coding also
    Mam I can take cse (IT)
    Please tell Mam

  • @azhar3001
    @azhar3001 Před 2 lety +1

    Mam how can reverse user input string with Preserving position of Space? Plz help

  • @ANILKUMAR-vv1fz
    @ANILKUMAR-vv1fz Před 3 lety

    Awesome logic

  • @alohoodalsahli1070
    @alohoodalsahli1070 Před 2 lety

    You are the best 🤩

  • @joychakraborty4367
    @joychakraborty4367 Před 2 lety

    You are amazing 😌

  • @Rakeshkumar-cr2go
    @Rakeshkumar-cr2go Před 3 lety +1

    Namskar mam, mai aapka ek subscriber hu, kya aap meri kuch madad kr skte hai. Mai apne computer me jaise hi keyboard plugin krta hu uske baad automatic files open hone lagti hai, automatic kuch letter type hone lgta hai, aur fir 1 se 2 minutes ke ander shut down ho jata hai. Maine 1) pc usb port bhi change kra liya 2) keyboard bhi change kra liya. 3) CZcams ke tricks bhi try kr liya fir bhi sahi nhi hua, ab aap bataye mai kya karu

  • @gskerbecs9513
    @gskerbecs9513 Před 7 měsíci

    Thanks alot mam

  • @tejassharma3212
    @tejassharma3212 Před rokem

    Thanks a lot mam 😊😊♥️♥️

  • @mahadeolokhande2996
    @mahadeolokhande2996 Před rokem

    Tnq u 😮

  • @rythmikz_beatbox
    @rythmikz_beatbox Před 2 lety

    Thank u maam ❤️❤️❤️

  • @balajibattu3001
    @balajibattu3001 Před 2 lety +1

    Hello mam,
    Iam placed as embedded software developer, recently.
    Will this unacademy useful to me to improve my coding ?
    Let me know briefly about it.
    Thank you mam &
    You are one of my best best faculty 💖.
    I love the way , how you are teaching ✨...

  • @pradnyadukre6248
    @pradnyadukre6248 Před 3 lety

    #include
    int main()
    {
    float f=0.1;
    if(f==0.1)
    {
    printf("no");
    }
    }
    Mam why if condition getting false here ,plz explain

    • @741ibrahim2
      @741ibrahim2 Před 3 lety +1

      i think if does not store float value

    • @pradnyadukre6248
      @pradnyadukre6248 Před 3 lety

      @@741ibrahim2 nahi..if so,compile time would have shown an error....it is compiling.

  • @VishalAwati18
    @VishalAwati18 Před 2 lety

    But ma'am u said while counting the length of string, we should not consider the null character.???

  • @vineethavs9845
    @vineethavs9845 Před 3 lety

    Thanku so much mam

  • @srivishnukumar8932
    @srivishnukumar8932 Před 2 lety

    Cute explanation

  • @PKTECHIE26
    @PKTECHIE26 Před 3 lety +1

    Mem kitne lecture or hoge
    To complete c

  • @mahankaliramasai8302
    @mahankaliramasai8302 Před 3 lety +1

    Pls upload python play list mam

  • @sayantisahaxcroll3250
    @sayantisahaxcroll3250 Před 5 měsíci

    Why we don't use puts instead of printf?

  • @PILLUDAS100
    @PILLUDAS100 Před rokem

    draw a flow diagram to input your name and print it in reverse

  • @RTBOSS
    @RTBOSS Před 3 lety

    Ye logic kahi to dekha he....😗 by the way thank you

  • @srivishnukumar8932
    @srivishnukumar8932 Před 2 lety

    Tq mam

  • @BhupathiAbhichethan
    @BhupathiAbhichethan Před rokem

    mam lecture is good but plz try to avoid background sounds

  • @EhabSmH0
    @EhabSmH0 Před rokem

    I can't understand how a parameter can be a pointer, and how is it used as a string in strrev function??

  • @siribura4982
    @siribura4982 Před 2 lety

    why does gets function is not working in my compiler its giving me error

  • @ishanrajvanshi6335
    @ishanrajvanshi6335 Před 2 lety

    Ma'am when did you taught swapping of two numbers?

  • @AtulYadav-ve5nq
    @AtulYadav-ve5nq Před 2 lety

    Mam this is a string or a array.

  • @rohangupta.1
    @rohangupta.1 Před 3 lety

    Can you give me solution of this
    write a C program that create data structure that are larger than the amount of physical memory contained in their machine

  • @Yami-br4vr
    @Yami-br4vr Před 2 lety

    Wuthout using string function yet u sue string function strlen why mam?

  • @adityaagrawal8201
    @adityaagrawal8201 Před 3 lety +1

    Best

    • @computer5548
      @computer5548 Před 3 lety

      czcams.com/video/RNXLD9jTcQ4/video.html

  • @vasu_13.
    @vasu_13. Před rokem +1

    22:43 Kya Kar Rahi Hu😅😂

  • @vaishagnair2768
    @vaishagnair2768 Před rokem

    Cant we use two for loop??

  • @tpvideo8725
    @tpvideo8725 Před 3 lety

    Mam how to find greatest word from given sentence?

  • @mass9323
    @mass9323 Před 3 lety

    How many days did what to learn c language

  • @abdulrahimjalloh363
    @abdulrahimjalloh363 Před rokem

    Thanks mam. Please mam send me the C notes

  • @harshavardhankorlepara

    at 4:42 you are a bit confused...i think mam

  • @yunusabdul1652
    @yunusabdul1652 Před 11 měsíci

    Mam can we take another string? Please check this
    #include
    #include
    int main()
    {int i,l;
    char a[30];
    char b[30];
    printf("enter the string:");
    gets(a);
    l=strlen(a);
    for(i=0;i

    • @RachitSrivastava69
      @RachitSrivastava69 Před 8 měsíci +1

      #include
      #include
      #include
      void main()
      {

      char s1[30];
      gets (s1);
      int l=strlen(s1);
      for(int i=l;i>=0;i--)
      {
      printf("%c",s1[i]);
      }
      }

  • @manujohn99
    @manujohn99 Před 3 lety +1

    Her name is not Jenny..........she is lying with the name only. What kind of teacher is she

  • @shekharsah2777
    @shekharsah2777 Před 3 lety

    MAINE AAJ AAPKO DWARKA SEC 19 AMBHARI GAON KE PASS DEKHA

  • @vasanth7672
    @vasanth7672 Před rokem

    You not used the strrev() function🙄

  • @abdullahiabubakar7270

    Gem!