If you've learned about pointers, have you learned about dynamic memory allocation, i.e. malloc/free. That would allow you to read a string into memory without technically using an array.
Also,...
Type: Posts; User: anduril462
If you've learned about pointers, have you learned about dynamic memory allocation, i.e. malloc/free. That would allow you to read a string into memory without technically using an array.
Also,...
Maybe I'm missing something really trivial, or some little trick to solving this without arrays, but I don't think so.
I see nothing that forbids use of arrays in that assignment, nor the use of...
Do you have to read them in first last order, or can you read the lastname first, in which case this becomes trivial?
EDIT: Can you post a link to the full assignment description, or copy-paste it...
You need to read firstname and lastname into char array variables (make sure they're large enough to hold a name). Look into the fgets function, or scanf for this*. Then, you can use printf with...