Lecture 30 Writing file using fwrite function in C language Hindi

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 68

  • @vineetsharma2163
    @vineetsharma2163 6 років тому +3

    Nice video AAP jaisa padate ho usse mera confidence level phle se jyada increase ho jata h thank you sir

  • @techworld1534
    @techworld1534 6 років тому +6

    Your explaination is very understandable.

  • @srinivaslukka3303
    @srinivaslukka3303 4 роки тому +1

    Your determination to spread ur knowledge is awesome sir 👏👏u will always be a great guru sir ☺️😊☺️

  • @tanishbajpai9952
    @tanishbajpai9952 7 років тому +2

    a tons of thanks to you sir..the way you clear the concepts is just awesome & most cool thing is that..u are doing it in hindi..loved all of them..thanks a lot sir...

  • @shalinikatore1161
    @shalinikatore1161 3 роки тому

    Sir really u have explained very simple way which we can understand.
    Thank u sir..

  • @rampraveshpandey8570
    @rampraveshpandey8570 6 років тому +2

    Sir you are best teacher in the world

  • @anshulmangal2755
    @anshulmangal2755 4 роки тому

    Nice explanation sir you are great teacher I find any language simple now👌👍👌👍👍

  • @priyaranjanbharti58
    @priyaranjanbharti58 6 років тому +3

    Nice explanation sir hatsoff

  • @kartickchandramanna267
    @kartickchandramanna267 2 роки тому

    Excellent Lecture.
    Thank you sir 🙏🙏

  • @CNILOYBARUA
    @CNILOYBARUA 2 роки тому

    Genius sir great we need more

  • @indresh_malviya
    @indresh_malviya 8 років тому +2

    very useful for all students..

  • @rishitasingal7246
    @rishitasingal7246 5 років тому +1

    Sir ur videos are awesome

  • @onkardhandale4200
    @onkardhandale4200 7 років тому +1

    thanks sir,for explaining fflush() function.

  • @rajnish1002
    @rajnish1002 3 роки тому

    for your explanation 👏👏👏👏

  • @sunziv01
    @sunziv01 6 років тому +1

    Thank you so much sir, you described very well.

  • @vinayjangra1401
    @vinayjangra1401 3 роки тому

    Great explanation ❤️

  • @karanmaurya2216
    @karanmaurya2216 Рік тому

    Thankyou sir ji 🙏

  • @ShawnDypxz
    @ShawnDypxz 3 роки тому +1

    The error is due to the first scanf. Scanf() takes in the characters/values from the buffer but leaves the '
    ' in the input buffer. Then gets() reads the input buffer and there exist '
    ' in the buffer. But '
    ' is delimiter for gets(). So in the end, gets() doesn't put anything into the variable. Now, the buffer is empty. Whatever we type is read by the next scanf() function.
    For that, we have to know the behavior of every input function.
    The best thing to do is put this code after every scanf().
    while(getchar()!='
    ');
    getchar() will also read from input buffer one by one. When getchar() reads '
    ' . The while loop closes. That leads to buffer being empty.

  • @shubhamthakur4945
    @shubhamthakur4945 8 років тому +1

    sir what is the difference between fputs and fwrite? can we write integer by using fputs function or this function is only to write characters?

  • @poojachitalkar9245
    @poojachitalkar9245 5 років тому +1

    😘😘

  • @lifeisnotarace3889
    @lifeisnotarace3889 6 років тому +4

    Sir when we do in general scanf then at that why this problem not created..that buffer is not created....
    Like
    Scanf("%d",&a);
    Scanf("%d",&b);
    In this also /n will be left in the buffer....

    • @vedangkavathiya8426
      @vedangkavathiya8426 4 роки тому

      Same doubt:(

    • @harshitbhargava6369
      @harshitbhargava6369 4 роки тому +1

      we do not require a buffer here as we have no intention of saving the input value to the hard disk,
      and therefore, the input value is not saved due to which, when you run the program again, the user is always asked to enter a new value.
      Therefore, you only require a buffer at a place where you need to store the entered value.

  • @souvikmondal2748
    @souvikmondal2748 6 років тому

    I think sir in the code block is supported windows base c so int variables take 4 bytes also total 9 bytes

  • @Compinfo-q5c
    @Compinfo-q5c 6 років тому +1

    Tysm sir😊

  • @MohdKaif-yu8qr
    @MohdKaif-yu8qr 2 роки тому

    sir fwrite ka use kr kr kya hum dot txt extantion use kr skhte h dot dat ke replace mein?

  • @biswajitghosh7638
    @biswajitghosh7638 4 роки тому

    ❤️❤️❤️❤️

  • @amaansiddiqui734
    @amaansiddiqui734 4 роки тому

    ❤️❤️❤️

  • @asthagoel6177
    @asthagoel6177 5 років тому +2

    I have a question Sir ,that at 17:15 how can float type (book price) store a string (book title) ?

  • @yashsrivastav58
    @yashsrivastav58 6 років тому

    sir, please upload a video on how to check file is empty or not? i searched google but not understand the methods of doing this,

  • @PankajDas-mw4uq
    @PankajDas-mw4uq 5 років тому +1

    Sir agar ek se jyada record ho to kya hamein dono variable ka address btana pdega

  • @dwitiasisodia1651
    @dwitiasisodia1651 2 роки тому

    Sir record1 ka kya mtlb hai
    3rd argument ka kya mtlb hai??

  • @aayushrjl
    @aayushrjl 6 років тому

    can we use fflush() after every scanf ??? will it create a problem ????

  • @utilitiesapp6715
    @utilitiesapp6715 7 років тому +1

    hi sir,sir can i get the the program of reading a raw file image and save it as bmp format file?...so if possible pls give me the program .....wishing the answer from u sir.....

  • @sairajdas6692
    @sairajdas6692 7 років тому +6

    Sir gets() k bad ek or fflush() q ni dale ?

    • @nikhilkhemchandani5991
      @nikhilkhemchandani5991 5 років тому

      bhai ek hi zarurat hoti hai

    • @negi3625
      @negi3625 4 роки тому +2

      Because gets () function iself place the cursor to next line .
      But in case of scanf we have to press the enter key after the entered data ,to move the cursor into the next fresh line.

    • @anugrahchaturvedi6764
      @anugrahchaturvedi6764 4 роки тому

      Sir 3rd argument ka kya meaning thi

  • @abhishekjaiswal6492
    @abhishekjaiswal6492 4 роки тому

    sir agar isko binary mode me open nhi krke normal way me open krte to??

  • @subhosaha184
    @subhosaha184 4 роки тому

    sir I declare a string as char s[4] but i can 5 character as input using gets().......
    how is it possible??

  • @sajankumar-re9cj
    @sajankumar-re9cj 6 років тому

    Sir kya hum file name ki jagah variable ka naam de skte hai jis variable me humne user se input krwaya hai.???

  • @piyush98182
    @piyush98182 7 років тому +3

    Sir .txt file tho suna tha lekin .dat file kiya hote hai??

    • @JP-qp9ht
      @JP-qp9ht 7 років тому +1

      google nhi h kya

  • @programmingworld8946
    @programmingworld8946 4 роки тому

    sir what is use of stdin and stdout

  • @sairajdas6692
    @sairajdas6692 7 років тому +1

    Hello Sir . Apny .dat file q bnay . iska kya purpose h ??

  • @bishalroy4861
    @bishalroy4861 5 років тому +1

    Sir 100 ke bad
    kyu buffer me tha?

  • @learner_jpr
    @learner_jpr 8 років тому +5

    sir fflush() mention karne ke baad bhi buffer empty nahi ho raha hai

    • @learner_jpr
      @learner_jpr 8 років тому +2

      +Saurabh Shukla #include
      struct book
      {
      int bookid;
      char title[20];
      float price;
      };
      int main()
      {
      FILE *fp;
      fp=fopen("f11.dat","wb");
      struct book b1;
      printf("Enter Bookid, Title and Price of Books: ");
      scanf("%d",b1.bookid);
      fflush(stdin);
      gets(b1.title);
      scanf("%f",&b1.price);
      fwrite(&b1,sizeof(b1),1,fp);
      fclose(fp);

    • @learner_jpr
      @learner_jpr 8 років тому +1

      +Saurabh Shukla thanks sir

    • @rahuldevlenka505
      @rahuldevlenka505 5 років тому

      @@learner_jpr bro scanf("%d",b1.bookid); me '&' missing hai

  • @sumankhanal4607
    @sumankhanal4607 5 років тому

    Even usingFFlush(stdin) the price didn't appear on output

  • @utilitiesapp6715
    @utilitiesapp6715 7 років тому

    i am using visual studio for this....

  • @sumankhanal4607
    @sumankhanal4607 5 років тому +1

    When I entered the same code price didn't appear

  • @subhransusarangihappy8958
    @subhransusarangihappy8958 5 років тому +1

    fflush( ) use karne ke baad bhi data enter nehi ho paraha he

  • @sonujha766
    @sonujha766 5 років тому

    Where shoul i make this prgrm

  • @shivamshukla9233
    @shivamshukla9233 5 років тому

    gets() does not work on text editor of ubuntu. so to remove this problem what should i do?

    • @anveshatagore542
      @anveshatagore542 3 роки тому

      Fgets will wrk..use it instead..

    • @infinity8982
      @infinity8982 Рік тому

      So late but it does work it just gives the warning.

  • @PrinceKumar-kr1lg
    @PrinceKumar-kr1lg 6 років тому +2

    Sir Mene same program write Kiya lakin Mene jab complier pr display Kiya to price ki value -NAN show ho rhi h

  • @sonujha766
    @sonujha766 5 років тому

    Anybody plzz tell me

  • @shyamkachhadiya4964
    @shyamkachhadiya4964 6 років тому

    wah kya likes hai 222 lul

  • @pawandev1876
    @pawandev1876 3 роки тому

    ❤️❤️❤️

  • @ankitajain6563
    @ankitajain6563 5 років тому +1

    Sir when we do in general scanf then why this problem not created..that buffer is not created....
    Like
    Scanf("%d",&a);
    Scanf("%d",&b);
    In this also /n will be left in the buffer....