Please, explain, why the second argument of fscanf () should be an address of the variable "score" and not just the name of this variable?? (At the same time, to read the string "Joe" into "name" you don't give its address, you give just the variable name..)
@Asmik20112011 This is more of a convention. All the variable names represent the contents of the variables except arrays whose names represent the address of the first element of the array. Now fscanf() always needs an address as the argument or parameter. So if you are passing an integer you have to use & to pass the address of the integer, but if you are passing an array or a string then all you need to do is to pass the name of the array and that would serve as the address.
Please, explain, why the second argument of fscanf () should be an address of the variable "score" and not just the name of this variable?? (At the same time, to read the string "Joe" into "name" you don't give its address, you give just the variable name..)
Asmik20112011 11 months ago
@Asmik20112011 This is more of a convention. All the variable names represent the contents of the variables except arrays whose names represent the address of the first element of the array. Now fscanf() always needs an address as the argument or parameter. So if you are passing an integer you have to use & to pass the address of the integer, but if you are passing an array or a string then all you need to do is to pass the name of the array and that would serve as the address.
Learnorama 10 months ago
@Learnorama Thank you so much for the answer. And your C Prog tutorials are really a great job. Thanks.
Asmik20112011 10 months ago
This has been flagged as spam show
@Learnorama Thank you so much for the answer. And your C Prog tutorials are really a great job. Thanks.
Asmik20112011 10 months ago
Have a question where Can send u an email??
Dinori15 11 months ago
But...you've mixed C and C++ syntax...
GreapyX 1 year ago
how do i read 1 line at a time and pause at each line for question & answer
program and print to the screen in c++
if(x ==1)textview01.setText(" Alabama pop.4,661,900")
if(x ==2)textview01.setText(" answer 1819 Montgomery pop.202,124")
if(x ==3)textview01.setText(" Alaska pop.686.293")
if(x ==4)textview01.setText(" answer 1959 Juneau pop.30,988")
if(x ==5)textview01.setText(" Arizona pop.6.500.180")
if(x ==6)textview01.setText(" answer 1912 Phoenix pop.1,601,587")
immygran42 1 year ago
thanks bro great stuff
Muscat17 1 year ago
This is great episode of tutorial. It is very easy to understand how everything works.
I am just woried it is one of last episodes :)
Please make more videos, they are priceless for a someone like me, who want to learn by self.
AutoRijeka 1 year ago