Read A File And Display Its Contents | C Programming Example

แชร์
ฝัง

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

  • @nyrx7koe327
    @nyrx7koe327 ปีที่แล้ว +13

    This is literally the best one could ask for in a programming course, lol. What's the catch? Seriously this is literally perfection in teaching a "part". One can follow and understand every step. Good mic quality, good onscreen information, and good english language. Only real criticism is that lightmode hurts my eyes (joke). Great job and Thank you!!

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

      You're welcome, thanks for providing all this positive feedback it's very motivating to hear that, and I'm glad you enjoyed the video! :-)

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

    Amazing set of videos. One video of interest might be why windows complains about using fopen as opposed to fopen_s(). This has always puzzled me.

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

    YOU HELPED SO MUCH OMG THANK YOU

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

      I’m so glad to hear that, and you’re very welcome! :-)

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

    Your voice and tonality 100℅ resembles Robert downey junior...Ironman🎉

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

    Error opening file😢
    Idk why, I even tried using path it won't work.I am using vscode btw

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

    Asante Sana

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

    Nothing gets printed on the terminal even though the txt file is not blank.

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

      Can you copy and paste in your code as a comment so I can try it out? The program should work.

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

      @@PortfolioCourses I forgot to add the file into the folder :/.Thanks for reaching out tho!

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

      Ok I’m glad to hear you figured it out! :-)

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

    can i use printf instead of putchar? i tried and it worked

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

    SO what about if you are trying to obtain a word from the file? Then what?
    I've been deep searching for a long time and cannot find a single solution to this and just left stranded as I am a new C programmer all I keep looping back to is "Hey now you can print the text from the file into a CMD / Terminal" rather than being able to actually do anything with that data from the file.

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

      It depends on what you mean by "obtain a word". That could mean a lot of different things. Does obtain mean "read the word"? Do you know where in the file the word is, like the line number?
      You'll find that a lot of really common problems have tutorials available for them, but less common problems do not. What you may need to do is combine ideas from different tutorials and solutions into a new solution that solves your problem. For example here are other videos about reading lines from files in different ways:
      th-cam.com/video/w0mgn6OLKUs/w-d-xo.html
      th-cam.com/video/X-1qodkHCHo/w-d-xo.html
      Depending on what your problem is, these might help you more or they might not. You may also need to find tutorials or videos that are about working with strings in order to solve the problem. For example there are tutorials/videos out there like this about dealing with words in strings:
      th-cam.com/video/vpdraEnrFnU/w-d-xo.html
      Anyways, that's my advice, that you might need to combine ideas from different tutorials to create your own solution to the problem, I hope this helps. :-)

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

    Hi, i'm not sure if you're still responding to comments, but i tried vc code in vs and putchar(c) isn't displaying what i have in the text file. I copied the exact same code you're using.

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

      putchar is crap, use printf instead

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

    Thank youu........ Soo much

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

    Helped Again !!!

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

      Awesome, I'm very glad to hear it helped you out! :-D

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

    Result where

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

      I'm not sure what you mean. The output should be on the terminal (i.e. the console). :-)