C Program to Reverse a String

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • Program to reverse a string without using strrev in C Language
    I hope you like this C Practice video. Here is the playlist for similar programs: • C Language Practice Pr...
    ►Checkout my English channel here: / programmingwithharry
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Python Tutorial In Hin...
    ►Python Complete Course In Hindi - • Python Tutorials For A...
    ►C Language Complete Course In Hindi -
    • C Language Tutorials I...
    ►JavaScript Complete Course In Hindi -
    • JavaScript Tutorials I...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Django Complete Course In Hindi -
    • Python Django Tutorial...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithhar...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

Komentáře • 164

  • @CodeWithHarry
    @CodeWithHarry  Před 4 lety +45

    I made a mistake while writing this program but instead of re-recording, I decided to show you the steps I took to correct my mistakes. Frankly speaking the video actually turned out to be great in my opinion! Don't miss this video!
    Access this playlist and if you share it on Insta dont forget to tag me
    Instagram: instagram.com/CodeWithHarry

  • @Jaii_shree_Ram
    @Jaii_shree_Ram Před 4 lety +19

    Raat me sone jao .. codewithharry uploaded new video ...subh utho then we have again notification 💕such hard working man 💝 lots of love and respect Harry bhai .. after this 2020 definitely your channel will have new heights 💕

    • @mondipeditz8578
      @mondipeditz8578 Před 4 lety +2

      That's what Harry's doi'n for us

    • @anant-strong
      @anant-strong Před 4 lety

      @@mondipeditz8578 Help me?
      Where should I learn C 15hrs video of harry or the playlist by harry.

    • @anant-strong
      @anant-strong Před 4 lety

      @@mondipeditz8578 Help me?
      Where should I learn C 15hrs video of harry or the playlist by harry.

    • @mondipeditz8578
      @mondipeditz8578 Před 4 lety

      @@anant-strong just learn it from internet

    • @anant-strong
      @anant-strong Před 4 lety

      @@mondipeditz8578 internet?

  • @aseries241
    @aseries241 Před 4 lety +18

    Dear Sir, please make a Java playlist like C++ and Pythons so that we can learn Java easily 🙏🙏🙏🙏🙏🙏

    • @sarhan8887
      @sarhan8887 Před rokem

      Hey bro.. You were on java and c++ before 2 years..
      I'm beginner.. Where are you right now? Can you tell me?
      How's your journey?.. I guess if you had learnt java c++ before 2 years
      . You are top of a head since now.. Reply plz. 😊

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

    Sir may Pakistan si ho may 14 sal ka ho may ni apki channel si programing lunguge seek li hian
    Love you 👍👍❤️❤️❤️

  • @vampkaitsolution4797
    @vampkaitsolution4797 Před 4 lety

    Harry bhi mai aj website development ap sai sikha hu or mai aj khud k web company chala rha hu ap k itna acha sikha nai k waja sai or jb v mujko problem hota hai ap k video sai abi v bahut help hota hai thanks allha ap ko salamat rakhay thanks bhi

  • @parthaschakra
    @parthaschakra Před 4 lety +2

    It's a good learning exercise. Just wanted to mention about a small glitch.
    It wont work properly if the length is an even number (say "Harrys" instead of "Harry").
    Need to add a function to check odd/even and run the "i" loop accordingly.

  • @harshitachaurasia1246
    @harshitachaurasia1246 Před 4 lety +2

    How to deal with mistakes!
    You helped in rectifying my mistake and improve it

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

    #include
    #include
    #include
    void main()
    {
    char array[250];
    scanf("%s",array);
    char rev[250];
    strcpy(rev,strrev(array));
    printf("%s",rev);
    }

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

    Please Make a Motivational video i,m watching your javascript playlist i have no computer i,m learning from my phone

  • @printfiamd5254
    @printfiamd5254 Před rokem +2

    Reversing a String :
    #include
    #include
    int main()
    {
    char s[100];
    printf("Enter a Word : ");
    scanf("%s",s);
    int l=strlen(s);
    for(int i=l-1;i>=0;i--)
    {
    printf("%c",s[i]);
    }
    return 0;
    }

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

      Yes bro, even I wanted to say that this is the fast and quickest solution instead of that shitt

  • @engineerbhai7642
    @engineerbhai7642 Před 4 lety +2

    Thank you so much Harry Bhai. Excellent work.

  • @technicalknowledge5678
    @technicalknowledge5678 Před 4 lety +1

    Bhai you are awesome thankyou so much for helping us ♥️❤️...I am your biggest fan 🔥

  • @codewithharryfanchannel559

    Thank you sir ji.

  • @sidhaantagarwal1746
    @sidhaantagarwal1746 Před 4 lety +2

    Hello harry bhaiya.....big fan

  • @anilsundar1546
    @anilsundar1546 Před 4 lety +1

    Thankyou Harry. Will you include the advanced/ latest features of c language as you keep on with these tutorials ??

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

    @CodeWithHarry sir len-1/2 is not working for "even" length of string... it should be len/2 as it gives an integer... this works for both even and odd and also for len = 8 we should go from 0 to 4 not 0 to 3 and hence len/2 is correct... and otherwise len -1-i is also correct.

  • @sakshinaruka3440
    @sakshinaruka3440 Před 3 lety

    bhaiya aap bohut jyaada achhe se explain kr rahe hae ....plz possible ho to isme or bhi achhe questions add kijiega :)

  • @souravchatterjee1446
    @souravchatterjee1446 Před 3 lety

    Sir i think there is a mistake in the program.
    in the for loop i

  • @palkeshrathore5320
    @palkeshrathore5320 Před 4 lety

    I want this best video and best channel😊😍😘

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

    we dont need to go with (n-1)/2 because compiler always take floor value if its int it will give out put 7/2=3

  • @vipulkumar3162
    @vipulkumar3162 Před 3 lety

    love you harry bhai

  • @neerajlalwani9506
    @neerajlalwani9506 Před 4 lety +1

    Sir java playlist please

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

    Hi Harry, ek doubt tha iss video mein. I tried to run this code with the string "Akshay" and it resulted in "yashka" but the correct value for reversed string should be "yahskA". But when I change the code in the for loop from i < ( len -1)/2 to i

  • @prasad.rsuvarna8432
    @prasad.rsuvarna8432 Před 4 lety

    Much Appreciated Bhai!

  • @allinone-mx9cm
    @allinone-mx9cm Před 4 lety

    Nice haary bhai make video on your programming journey

  • @sjrai1538
    @sjrai1538 Před 4 lety

    Bhai solid Yaar gjb Maza as gaya bro

  • @siddhanttiwari6367
    @siddhanttiwari6367 Před 4 lety

    It's help me a lot

  • @Me-su6bx
    @Me-su6bx Před 4 lety +3

    15:08 this is wrong for even numbers try writing something other than harry (ex- someon)

  • @sidhaantagarwal1746
    @sidhaantagarwal1746 Před 4 lety +1

    Bhaiya I'm in class 11.....and I love coding a lot....pls guide kar dijiye what games I can make in pygame...I have already made space invaders game and fruit ninga type games...plz suggest...flappybird bhi code kar raha hu filal....ho sake bhaiya to aap bhi kuch naye games upload karona

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

    There is Problem in code.
    Hello Harry...i love your content and thank you for all vedios, but in this vedio in "for loop we have to write i

  • @asimsau1930
    @asimsau1930 Před 4 lety

    you are great.

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

    //using only one array:
    #include
    #include
    #include
    void main()
    {
    char array[300];
    char a;
    gets(array);
    for (int i = 0; i < strlen(array)/2; i++)
    {
    a=array[i];
    array[i]=array[strlen(array)-1-i];
    array[strlen(array)-1-i]=a;
    }
    puts(array);
    }

  • @shivanshutyagi83
    @shivanshutyagi83 Před 4 lety

    Harry bhai 👋👋

  • @vishusharma7848
    @vishusharma7848 Před 4 lety +1

    Imagine getting a heart from codewithharry
    Excited to get this golden opportunity

  • @Ammarkoka
    @Ammarkoka Před 4 lety

    Please make a videos series on python for data science...

  • @VirtualAcademypk
    @VirtualAcademypk Před 4 lety

    Hello sir aap mic kon sa use kr rahy hain... Main ny kafi bar comment kia lekin koi reply nhi aaya...

  • @technicalsaksham3556
    @technicalsaksham3556 Před 4 lety

    Please make a full tutorial series on kivy

  • @Steve_Chandan
    @Steve_Chandan Před 4 lety

    Harry bhai can you solve some questions of Hacker rank and Leetcode........ please

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

    #include
    #include
    #include
    void main()
    {
    char array[300];
    gets(array);
    char rev[strlen(array)];
    for (int i = 0; i < strlen(array); i++)
    {
    rev[i]=array[strlen(array)-1-i];
    }
    puts(rev);
    }

  • @hritikadwani2963
    @hritikadwani2963 Před 4 lety +2

    sir androrid studio pe koi tutorial banaiye plzz🙏🙏🙏🙏🙏

  • @balancemyself
    @balancemyself Před 4 lety

    Awesome video

  • @nirmalyabehuria8511
    @nirmalyabehuria8511 Před 4 lety

    Harry bhai kotlin ka vdo bana do plzzzz

  • @AMANYADAV-nn9rm
    @AMANYADAV-nn9rm Před 4 lety

    sir plz make vidoes on kali linux

  • @nopaidandroidgaming3201

    Sir please start series of html and css

  • @anshitshukla7498
    @anshitshukla7498 Před 4 lety

    Harry bhy Zindabad 🙏🙏

  • @hafsaali8462
    @hafsaali8462 Před 3 lety

    line 9 main %d ki jaga %s aae ga coz uh are taking srting not an integer

  • @amitthakur7
    @amitthakur7 Před 4 lety

    please make playlist on reactjs please you have created playlist of website development but reactjs is included in that so without reactjs its incomlete its necessary for web developer to learn reactjs also so please make reactjs playlist in hindi. i am searching for it so long but can't able to find a good teacher like you to make things easier to understand please please .
    from your fan and student.

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

    if we give a string having even number of characters with middle 2 alphabets different the program won't give correct result. for example in word hariys

  • @xsuritox1058
    @xsuritox1058 Před 4 lety

    stack se brackets ka program bhi dikhao, hackerrank ya codechef k questions bhi bataiye

  • @mudraclasses4504
    @mudraclasses4504 Před 4 lety

    Hello Sir,
    I need your Pycharm Settings that you used in your tkinter series (Example, from, import, def keyword statements are in blue foreground)
    Pls reply...

  • @SalimSalim-oe1um
    @SalimSalim-oe1um Před rokem

    len/2 is correct bro.

  • @ronakmaniya2005
    @ronakmaniya2005 Před 11 dny +1

    Loop chalshe half of a string array size 😁

  • @RavinderSingh-yv5cd
    @RavinderSingh-yv5cd Před 4 lety

    Please tell how to make pong game or easiest game in c

  • @AmeerHamza-xk4zd
    @AmeerHamza-xk4zd Před 4 lety +1

    Sir gmail contact form banana sikhye Django me plzz

  • @smitkumarrathod5665
    @smitkumarrathod5665 Před 4 lety

    Sir ,pls aap c++ ke practice problem ke video upload karna .

  • @mondipeditz8578
    @mondipeditz8578 Před 4 lety +1

    I had grabbed the mistake that you made (len-2-i)i was like oh yeah soon you're gonna correct it into len-1-i😄😄

    • @anant-strong
      @anant-strong Před 4 lety

      Can you help me?
      Where should i learn C 15hrs video of harry or the playlist of C.

    • @vivekgupta_3085
      @vivekgupta_3085 Před 4 lety +1

      Playlist

    • @vivekgupta_3085
      @vivekgupta_3085 Před 4 lety +1

      And you can even watch the Naresh i technology

    • @anant-strong
      @anant-strong Před 4 lety +1

      @@vivekgupta_3085 thanks for the answer i have started the playlist

    • @vivekgupta_3085
      @vivekgupta_3085 Před 4 lety

      @@anant-strong which playlist Naresh it ?

  • @shantanu_saraf
    @shantanu_saraf Před 2 lety

    In for loop we should use len/2 it will work both for even and odd strings.
    Great video harry bhai🤍

    • @snehapaliya9094
      @snehapaliya9094 Před 9 měsíci +1

      Thanks, man, for clearing this doubt

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

      Yes! he has only done for odd strings...but len/2 will cover all cases

  • @SurajKumar-bo2tv
    @SurajKumar-bo2tv Před 3 lety

    Sir
    Ydi saare different char ho to 3rd wala reverse nhi ho rha h

  • @sandipsandal
    @sandipsandal Před 4 lety

    sir, mere django project me norrmally sirf yahi requirment hai..
    1. user detail me user ka mobile no and uska image required hai,
    2. user bhi html page se hi apna blog post kar sake
    3. user apna detail update or delete kar skae
    please sir thora time nikal ke kuch video bana do ess se related hindi me

    • @sandipsandal
      @sandipsandal Před 4 lety

      sorry sir aapko is channel pe msg kiya kyon ki abhi aap isis channel pe active ho..

  • @sandhyabhosale6328
    @sandhyabhosale6328 Před 4 lety

    Harry bhai first viewer

  • @RohitSharma-mh5sv
    @RohitSharma-mh5sv Před 4 lety

    Are you using a pen or something like that or doing this with mouse please answer ???😢

  • @depisacreation3169
    @depisacreation3169 Před 2 lety

    Sir of string pattern. A reverse like name?

  • @vaibhavsalunkhe1785
    @vaibhavsalunkhe1785 Před 4 lety

    Harry how to launch website

  • @exito-1
    @exito-1 Před 2 lety

    mere abhi bhi run nahi ho raha hai me kya karu mere name himanshu hai and me jab string me himanshu type kar raha hu rab mere reverse string " uhsanmih" ye aa raha hai , mene code bhi check kara hai same to same hai?
    please solve harry bhai

  • @kalyanikondapalli7252

    Sir pls keep the algorithm for this code

  • @RohanDasRD
    @RohanDasRD Před 4 lety +4

    First

    • @nikhilraj1842
      @nikhilraj1842 Před 4 lety +1

      areey yaar automated script laga rakhi hae kya jo har bhar First 😅️😅️

  • @Saniyamohite18
    @Saniyamohite18 Před rokem +1

    👍🏻

  • @AmanRaj-wz6ds
    @AmanRaj-wz6ds Před 3 lety

    Bhai pahli baar apke mistakes dekhe maja aa gaya.....bura maat manna...

  • @sambhavsingh5903
    @sambhavsingh5903 Před 4 lety

    Harry bro

  • @raviranjan477
    @raviranjan477 Před 4 lety

    I m new in your channel I want to ask question that best course for java and android developer plzzzz help me reply

  • @abdullahjaved2044
    @abdullahjaved2044 Před 4 lety

    Sir PLease make React Js course React webdevelopment course or any simple introduction how can i become a react js developer

  • @sunilkumar-ku9um
    @sunilkumar-ku9um Před 4 lety

    Sir please help
    I am beginner in c language and I want to become game programmer so please suggest me which window I use

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

    #include
    int main() {
    // Write C code here
    char str[100]={"Harry"};
    int count=0;
    while(str[count]!='\0'){
    count++;
    }
    //reversing a string
    for(int i=count-1;i>=0;i--){
    printf("%c", str[i]);
    } return 0;
    }

  • @vikramjha7450
    @vikramjha7450 Před 4 lety

    Bhai please reply , c Kaha se sikhu 15 hour se ya playlist se ?

  • @uniqcreationz
    @uniqcreationz Před 4 lety +2

    Kyaa ek 4GB ke pc me python hoskti haii

    • @Ammarkoka
      @Ammarkoka Před 4 lety +1

      Internal storage ya RAM??

    • @uniqcreationz
      @uniqcreationz Před 4 lety +1

      @@Ammarkoka 4GB RAM

    • @Ammarkoka
      @Ammarkoka Před 4 lety +2

      @@uniqcreationz obviously bro why not i have also 4gb ram. Python is very light weight you can also use different ide such as vscode and sublime but i give u advise don't use any highweight ide's such as pycharm little bit hanged in system. But you can also use that's also. If you want.

    • @uniqcreationz
      @uniqcreationz Před 4 lety +2

      @@Ammarkoka ok thanks 💯🥳

  • @user-ej9pe2fw6x
    @user-ej9pe2fw6x Před 7 měsíci +2

    herry vai ye sirf odd le liye likha apnee
    this code is for any string:)
    #include
    int main(){
    int i,j;
    char arry[100];
    printf("enter string: ");
    scanf("%s",&arry);
    //length of arry
    int len=0;
    while(arry[len] != '\0' ){
    len++;
    }
    printf("the length of string is %d",len);
    int num=0;
    if(len%2==0){
    num=len/2;
    }else{
    num=(len-1)/2;
    }
    for(int i=0;i

  • @oyepuru
    @oyepuru Před 4 lety

    Harry bhai Please Yaar Reply To Kr Do Kai Baar Comment Kr Diya
    Please Ek video Bana Do Competitive Programing Par Me Python Prefer Karta Lekin Competitive Coding Ke Liye c++ use karna chhahta hoon to kya ek company accept kr skti hai esa banda jo Competitive Coding c++ me kre aur Devlopment python
    Aur harry road map please explain kro yaar i am in 2nd year right now
    Bro Please🙏❣️
    Thanks For Free Education

  • @dsboy3790
    @dsboy3790 Před 3 lety

    Sir c++ ke liye cout ka sentence kaise banega

  • @fost3151
    @fost3151 Před 4 lety

    Advance web development course tutorials place

  • @RavinderSingh-yv5cd
    @RavinderSingh-yv5cd Před 4 lety

    Please tell how to make easiest c game with animation

  • @Mohd_Rayyan123
    @Mohd_Rayyan123 Před 4 lety

    Who want ❤❤ from harry bhai

  • @kamalsaxena1384
    @kamalsaxena1384 Před 4 lety

    Sir how to integrate payment gateway for website in nodejs reactjs steps by step

  • @MananGandhi
    @MananGandhi Před 4 lety

    Sir pls livestream kar do

  • @beunique730
    @beunique730 Před 4 lety +1

    👍👍

  • @nikhilraj1842
    @nikhilraj1842 Před 4 lety

    Please Reply
    Harry Bhai Aapse ek sawal aap apne aap ko harry kyo bulate ho haris ali khan ke badle

  • @mohammadshahul9026
    @mohammadshahul9026 Před 4 lety

    1 st comment like me thank you

  • @shahzebchoudry6175
    @shahzebchoudry6175 Před 4 lety

    Harry bahi I have made projects in python and these are now visible on screen how can I access them again

  • @sunilkumar-ku9um
    @sunilkumar-ku9um Před 4 lety

    Sir please help me
    I am c beginner and I want to become game programmer so please please please please please help me to find a good window

  • @bot.xqueen5886
    @bot.xqueen5886 Před 3 lety

    Sir aap to raftar mi tare bolte ho🤔

  • @satyamkush527
    @satyamkush527 Před 3 lety

    bro , your code is wrong , please try string other than harrry

  • @siddhesh1695
    @siddhesh1695 Před 4 lety

    Harry bhai maine reverse JAVA mein try kiya bina kisi method se. Barabar nahi output aa raha hai. Can you please find out the mistake?
    import java.util.*;
    public class Reverseee
    {
    public static void main(String[] args)
    {
    String str="Siddhesh"; //my string
    char st[]=new char[10]; //character array to store string
    System.out.println(d);
    int i,j;
    int c=str.length();
    for(i=c-1;i>=0;i--)
    {
    for(j=0;j

    • @eternalknight2958
      @eternalknight2958 Před rokem

      WOULD BE THE CORRECT CODE :
      import java.util.*;
      public class Reverseee {
      public static void main(String[] args) {
      String str = "Siddhesh"; // my string
      char st[] = new char[10]; // character array to store string
      int i, j;
      int c = str.length();
      // Reverse the characters in the string and store them in the character array
      for (i = 0, j = c - 1; i < c; i++, j--) {
      st[i] = str.charAt(j);
      }
      // Print the reversed string
      System.out.println("Output
      ");
      for (i = 0; i < str.length(); i++) {
      System.out.print(st[i]);
      }
      System.out.println();
      }
      }

  • @abhishekvishwakarma9045

    Hello harry bhai "Android ka course in KOTLIN" bana do if possible.
    Waise aapka pura naam kya h 😅 mein linkedIn pe search kr raha tha par mila hi nahi

  • @anonymouszone2472
    @anonymouszone2472 Před 4 lety

    Hello brother...??

  • @arpanmaheshwari2290
    @arpanmaheshwari2290 Před 4 lety

    bhai bhut badi string ke liye ye fail ho raha hai

  • @Kumarsingh-p23
    @Kumarsingh-p23 Před 4 lety

    first comment 🤗🤗

  • @vivekgupta_3085
    @vivekgupta_3085 Před 4 lety

    Advertisement khuch jayda h

  • @janvibahuguna865
    @janvibahuguna865 Před 4 lety

    Nitish

  • @user-wr9xx3ik2y
    @user-wr9xx3ik2y Před 4 lety

    Inested of Harry just put Hary it doesn't work

  • @Mohd_Rayyan123
    @Mohd_Rayyan123 Před 4 lety

    bhai please muje pin kardo harry bhai please dil seh

  • @satyamshakya9732
    @satyamshakya9732 Před 2 lety

    Kuch palle hi nhi pda