[BIG HELP:] File Reading and Writing in C

This is a discussion on [BIG HELP:] File Reading and Writing in C within the C Programming forums, part of the General Programming Boards category; hello guys!!! pls help me with my probem..
i just want to make a simple database like,,
the program will ...

[BIG HELP:] File Reading and Writing in C

the program will ask the user if he wants to edit the existing info. in the "printf", but if he edit it, the details he typed will store in a .TXT file,

for ex.:

#include<stdio.h>
main()
{
printf("I am .R.");
/*then the program will ask if the user wants to edit the details in "printf", if the user want it, then the program wil provide a .txt file, that will be the database of the program where the details will be stored if the user edited the "printf".*/

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

Sounds like a homework assignment to me. You need to post up what you have tried so far and we can go from there. Without that, take a look at C Made Easy Tutorials. They will get you headed in the right direction.

Sounds like a homework assignment to me. You need to post up what you have tried so far and we can go from there. Without that, take a look at C Made Easy Tutorials. They will get you headed in the right direction.

i just want a example.. because i'll use that in my program.. tnx to your respond...

1) Please don't bump threads... and especially not after only 4 minutes!

2) No; we're not going to give you code so you can "use that in my program"... that's scoop and poop coding and it's NOT how you learn C.

Do you actually want to learn C programming or are you just trying to pass a course you didn't want to take in the first place?

If it's the former... get a decent book on C ( Teach Yourself C in 21 Days is pretty good... The C Programming Language is held in very high esteem) and start with page 1... read every word, compile the examples and exercises, learn what does and does not work... review as necessary, then turn to page 2 ... by the time you get to the end of the book you should be able to write simple programs in console mode... the rest comes with experience and practice.

CommonTater, you are awesome. I am also learning C, and I find it very helpful to read a lot of tutorials and sample code, and then try and create programs that will cause you to run into problems and have to solve them. Good luck to you kal27 .

1) Please don't bump threads... and especially not after only 4 minutes!

2) No; we're not going to give you code so you can "use that in my program"... that's scoop and poop coding and it's NOT how you learn C.

Do you actually want to learn C programming or are you just trying to pass a course you didn't want to take in the first place?

If it's the former... get a decent book on C ( Teach Yourself C in 21 Days is pretty good... The C Programming Language is held in very high esteem) and start with page 1... read every word, compile the examples and exercises, learn what does and does not work... review as necessary, then turn to page 2 ... by the time you get to the end of the book you should be able to write simple programs in console mode... the rest comes with experience and practice.

no just an example of the code so that i could analyze it, testing it, and may make code. in that case, i learned to that code... i'm not up to the sake of completion, i just need a simple code so that i can make advance code. tnx to your respond...

Trust me Kal ... you're not going to learn C by memorizing code snippets... The only way I know to make something this complex actually sink in and stay sunk in is through a protracted course of deliberate study.