@laserlight~Thanks!
Type: Posts; User: bluechip
@laserlight~Thanks!
I started learning C about 8 weeks ago. I want to use the tools I learnt to develop an address book program. I know how to use random access files to store and retrieve the data, but I want to use...
@AndiPersti: Thanks for that! I learnt that way of controlling loops from the book 'C: How To Program Deitel'. I didn't know it was wrong!
@matticus: The function needs arguments, so that it will be able to print the content of any character array and as such any instruction
With the prototype u wrote, it means the function 'instruction' is not returning any value and it is not accepting any arguments. Since u want the function to display information, it must accept an...
What you can do is declare a function and make it accept a character array and output the array. Then call the function and pass a pointer to an initialised character array to the function.
fscanf(fp,"%s%d%s",model,&year,last);
while ( !feof(fp) ) {
printf("%s %d %s",model, year, last);
fscanf(fp,"%s%d%s",model,&year,last);
}
You need to create three variables to read the contents of the file. 2 character arrays and one integer variable, say char model[20], int year, char last[20]
You will use a loop to read through the...
Make sure you always close every file stream you open. If you dont, the OS will do it for you, but it is good practice to close it
What is the difference between an integer array and a char array in C? Is an integer array terminated with a sentinel character too?
I have been teaching myself C programming too with books for a couple of weeks. I started with Head First C but I later had to change to another book because Head First C didn't explain programming...
I'm a newbie. I want to know why the former code didn't work but the latter one worked. Thanks
Thank you very much for your response.
I wrote a program to calculate the tranpose of a matrix. The declaration part of my code is
int m, n; //m is the number of rows of the array and n is the number of columns of the array
int i,j;...
I want to design a fingerprint matching application but I don't know how I can go about it.
Does anybody here know any tutorial that will teach me this or does anybody have a good ebook on this...
Thanks so much! It worked. I didn't think dat strings inputed with fgets() will contain the \n.
This is my first time on this site so I'll appreciate any help.
I'm a beginner programmer, I started coding C 2 weeks ago. I wrote this program and it didnt give me the expected result.
...