Hmm thanks I'll try that and get back to you...
Type: Posts; User: TexasKid
Hmm thanks I'll try that and get back to you...
Can you show me how to use fgets() please to store both names please ?
I need to write a program that asks the user to input his name and display it on screen. It is required that the program also caters for people having 2 names, for example Peter Michael.
The...
Now I have floating point representations, and I have to restrict the numbers to 1 d.p . So I did %.1f . How can I use the above technique with such representations please?
Thanks a lot Salem. Just what I needed !
I am writing a program that lets the user enter the name and surname of his employees. I also need to put this information in a table , under the headings NAME SURNAME, where the names would be put...
I just edited the insertStudent function , so that the counter is incremented. How can the counter then be displayed ?
This is the edited insertStudent function :
void...
I already added the variable 'counter' in the structure. Can you help me create the search function please?
So I am writing a program where the user has to enter various names , and then a list shows the entered names in alphabetical order. My program is working , but if for example the user enters the...
I am writing a program that is like a survey. It prompts the user to enter his favorite meal. Then after all users have submitted their choices, the program should display the results.
The user...
ok it is working now . Thanks Adak , and all the others that tried to help.
ok I think it is working Adak with getchar(). I'll test it a bit and I'll get back to you.
Thanks Adak , but the condition that specifies that the user ha to input a number between 1 and 6 works. The problem is in the condition that states that no alphabet character must be input.
I think I understood. So how can I do it with ASCII please , so that A-Z characters cannot be input from the user ?
I tried it with or , but still not obeying the condition that it must not be alphabetic.
I am writing a menu for a program. The user has to chose from 6 options, hence the user can only enter numbers between 1 and 6. I also did a condition so that no other characters rather than numbers...
oh ok thanks.
what should I use then please?
I am using this conditon :
name[i] !='\'' && name[i] !=' ' && !isalpha(name[i])
and it is working. The only problem I am seeing is that when for example the user enters : "Michael Paul" <--...
but how can it also accept single quote characters and spaces , but does not accept other punctuation marks ?
So I need to validate the input that the user enters. The user has to enter his name , and the program must check that the name's characters are from the alphabet , but the single quote ' and space...
I need to know how to access the character string from the file according t the RecNumber inputted by the user , s that I can read the length using strlen().
I am writing a program that creates a textfile that stores records. Each record is storing the following structure :
typedef struct Client
{
char id[10];
char name[25];
...
When adding records to a file, the program is automatically saving records after each other , for example it starts at 0,1,2 etc. But can I for example store a record directly at position 40 for...
What do you mean by returning an int ? .. sorry for my ignorance but I am new to C.