Questions 🤔 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Questions 🤔

my University shoes C as the language for introducing us to developing . we just started and I'm already in love . but there is somethings that the teacher is not explaining to wet . my curiosity is killing me so I need some answers : scanf("%d",&a); what does the "&" means ? how can I work with a string ? what does ( return 0; ) means? what are the #include < ------> ? THANK YOU !!!

10th Nov 2017, 2:00 PM
khalil alla
khalil alla - avatar
5 Answers
+ 4
& presents the address location where the value of a will be stored
10th Nov 2017, 2:43 PM
zezeki
zezeki - avatar
+ 9
c++ is taught here. it is derived from c but is different in many ways. why not do the c++ course here as well. all these answers are waiting for you there :)
10th Nov 2017, 2:08 PM
jay
jay - avatar
+ 1
but how can we know when there is multiple variables ( how can & present every address )
10th Nov 2017, 3:13 PM
khalil alla
khalil alla - avatar
0
let me correct myself, & means the address, but when you put &a, then it is the address of a, and if you have another variable b, then the &b presents the address of b, and so on
10th Nov 2017, 5:59 PM
zezeki
zezeki - avatar
0
ohh so scanf("%d",&a) means that a int is gonna be stored in the address of a .
10th Nov 2017, 6:11 PM
khalil alla
khalil alla - avatar