R
raphfrk
I am compiling these 2 pieces of code and getting different results
int a = 2;
fscanf( fp , "%*s" , a , buf );
int a = 2;
fscanf( fp , "%*s" , a , buf );
[email protected] said:I am compiling these 2 pieces of code and getting different
results
int a = 2;
fscanf( fp , "%*s" , a , buf );
-----
fscanf( fp , "%2s" , buf );
Shouldn't they both give the same result ?
No. The * flag has a different meaning in fscanf than it does
in fprintf.
[email protected] said:Ahh, OK. What does it mean for scanf?
Richard said:You will be referring all questions to the FAQ and the C standard from
now on then I guess?
No, only those which, like this one, are immediately and unambiguously
answered by a brief and easily located passage in any relevant
reference, which the OP undoubtedly has readily available.
As it stands, I think
it's worthwhile for the OP to get in the habit of finding such things
himself, though I probably should have said so more politely.
I would get my info about c from the internet. I did do a search, but
frankly even the fact that you do %*s for printf isn't always covered.
Ask people who are very likely to know the answer is finding the info.
[email protected] said:I would get my info about c from the internet. I did do a search, but
frankly even the fact that you do %*s for printf isn't always covered.
Ask people who are very likely to know the answer is finding the info.
[email protected] said:I would get my info about c from the internet. I did do a
search, but frankly even the fact that you do %*s for printf
isn't always covered.
Ask people who are very likely to know the answer is finding the
info.
That's nice. Why are you here?
All questions can be answered by yourself by using Google and reading
manuals and taking time. These groups are here to help people find
timely answers. I suggest you leave the group if its too menial for your
huge brain to encumber itself with. That or set up shop with Chuck who
you seem to share a lot of characteristics with.
JosephKK said:
Unless he's completely changed his character in the last year or
two, Richard Noname doesn't do helpful. He only does snide, stupid,
and group hugs with the other trolls. (Sometimes all three at
once.) Towering hypocrisy is his to command.
So the question is this: *has* Richard Noname completely changed his
character in the last year or two? Has he suddenly started posting
useful answers to C questions?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.