@Alexandros5th int implies it to be a value, the parentheses tell it that it's a function. If we said just main(void) then the compiler wouldn't know what it's returning. (int main() works fine too).
I tried running this without initially setting counter to 1, and it began at 2 (i.e. counted from 2 - 9). After a little investigation, it appeared that counter was set to 2 as a default. Anyone know why this is?
@NozFwbit did you set it to 2 or did it just start that way? I think that if an integer isn't directly given a value the computer just makes one up from 1 to 10. I may be wrong but while making an infinate counting loop for fun, I didn't assign a value to my variable and it started from 5...
hmm.. i mean.. i guess do loops is a way of making a time delay between running a set of commands... is their a more efficient way of delaying time? im not sure if do loops are used for this .. but thats what comes to mind
TQ very much, your tut are awesome, but one Request, when you have your "whooping" cough, don't cough in the mic, as it looses my atttn span, Please cough away.
Exactly. I been trying to learn in C, but couldn't find any tutorial to keep me informed of what is going on. Next, I tried learning in BASIC, but found it too hard. Strangely, now I find C programming much easier with these tutorials. Hopefully I can master it. Great tutorials!
the hardest part for me was to find a good compiler. this one is awesome because it begins right in the beginning downloading the compiler the configuration and stuff
haha....i'm 15 in secondary school,i just watch this for fun and i understand what you said.i've just gotten a new interest.
thecuber1122113 2 weeks ago
Comment removed
AJJSDN 1 month ago
do I need to place int main (void) in the beginning? why not simply put main(void) or main()? and what's the difference between these three?
Alexandros5th 1 month ago
@Alexandros5th int implies it to be a value, the parentheses tell it that it's a function. If we said just main(void) then the compiler wouldn't know what it's returning. (int main() works fine too).
Radnyxerr 1 week ago
How to make your computer sound like a vacuum cleaner:
do {
printf("%d\n", counter);
counter++;
} while (counter>0);
ViktorBluhme 2 months ago 2
thanks for this video, this is a big help to me for this coming departmental test of ours :))..
tedkenneth14344 3 months ago
you explained it very effectively thanks a lot
shuwukong 3 months ago
what's the function of the counter? I'm sorry I dont know ..:))
mYnameiSma0 4 months ago
@mYnameiSma0 it just shows the condition of the loop
bondservant4Him 4 months ago
wow! i found something cool! try this:
[code]
int=1;
while(int>0) {
printf("%d\n",int);
int++;
}
[/code]
enjoy...
mastermax7777 5 months ago 2
@mastermax7777 int cant be a variable name
bondservant4Him 5 months ago
@bondservant4Him Correct! And even if that "int" is a legal variable, that while loop will execute infinite times!
LightningHexagon 5 months ago
change the while part to say
}while(counter > -1)
cookiesRgood26 5 months ago
I tried running this without initially setting counter to 1, and it began at 2 (i.e. counted from 2 - 9). After a little investigation, it appeared that counter was set to 2 as a default. Anyone know why this is?
NozFwbit 6 months ago
@NozFwbit did you set it to 2 or did it just start that way? I think that if an integer isn't directly given a value the computer just makes one up from 1 to 10. I may be wrong but while making an infinate counting loop for fun, I didn't assign a value to my variable and it started from 5...
cookiesRgood26 5 months ago
This has been flagged as spam show
Thank you a lot. You tutorials are so simple to understand, short and very usefull.
WinXPproff 6 months ago
Comment removed
WinXPproff 6 months ago
hmm.. i mean.. i guess do loops is a way of making a time delay between running a set of commands... is their a more efficient way of delaying time? im not sure if do loops are used for this .. but thats what comes to mind
DrLafranz 7 months ago
lol after he typed in coutner.. i was like... nooo.. u have ruined programming for everyone!!!
DrLafranz 7 months ago
try this 1
printf("%d", counter);
counter++;
}while(counter < 1000000000);
psniwillrocku99 8 months ago in playlist C Programming Tutorials
@psniwillrocku99 u trying to crash ur comp?
DrLafranz 7 months ago
@DrLafranz no because i hav an alienware m17x i think it will be fine
psniwillrocku99 7 months ago
dude u r the only one, u r awesome.Thanxxx a lot God bless you:-)
devesh16737 9 months ago
which loop will result in faster average performance: do while or while?
jRedTree85 10 months ago
what does conio.h means? whats that for?
MrKyte12 10 months ago
@MrKyte12 conio.h is a non standard, little supported header file which should generally be avoided.
cplusplusish 9 months ago
@cplusplusish but what does it do?
MrKyte12 9 months ago
Save some typing: do{ printf("%d\n", counter++); }while(counter <10);
nulledsession 10 months ago
you should teach C programing at an university.
PivotBeguiner 11 months ago
This has been flagged as spam show
Thank you soooooo very much
rigelglen 11 months ago
nice tutuorials dude they realy help a lot
shortlthug88 1 year ago
CS50.net
Jugdesi 1 year ago
You have that cough every single Video xD
Mexicouger 1 year ago
My favorites on youtube, are; Ray william johnson, Jimmyr and you!
SquigFacer 1 year ago
How to Test on numbers in general????
so if I typ an character it should be wrong
and vice versa. on characters.
if I Typ an number it should be wrong.
enesog 1 year ago
You skipped for loops! D=<
crazynoob11 1 year ago
that was neat and informative. thanks!
aydinliq 1 year ago
this is great dude! i hope u make alots of tutorials... nys whooping cough hehe...anyway thank you again
mopmop3434 1 year ago
great job friend
sujeshanto 1 year ago
9 Tutorials in, and still got the cough..... Gutted
CraigMcAllisterMusic 1 year ago
@CraigMcAllisterMusic :-i think he did all d tutorials on same day.
hotvampire1992 1 year ago
why is the void inside the main parentesis?? for what is that?
metallicarula 1 year ago
do you do pic microcontrollersssss? and header files?
TurKdiRty 1 year ago
@TurKdiRty wanna learn about header files? Message me, ill try to help you/.
0121ryanh117 1 year ago
would u tell me whatt software u using??
at this moment, i am using visual studio 08 but it still good as ur's during show the error
i reali like that
thx...
deeshrn520 2 years ago
@deeshrn520
DEV C++ by bloodshed
BufferOverflowAttack 2 years ago
dev c
stonechime18 1 year ago
TQ very much, your tut are awesome, but one Request, when you have your "whooping" cough, don't cough in the mic, as it looses my atttn span, Please cough away.
Thnks
natshamo 2 years ago
wtf!
if you wanna learn,you have to love his whooping coughs aswell!
persianqu33n 2 years ago
I hope you are joking, other wise you have the attention span of an infant
ManiacAfro 1 year ago
your HP is opened in Japan. Anyway, more C tutorial please
tedtdu 2 years ago 19
i really like this tutorial.. every easy to understand.
alshezfatm 2 years ago
dude thank your for C tutorials, they've been a great help!
lodikr 2 years ago
it worked fine for me
thx
xxyuri 2 years ago
any1 know why i keep getting 2293620 9 times down the screen when i compile and run the program? all other tuts have worked fine up until now :S
bikarida 2 years ago
great .....................
TheMaksud 2 years ago
hey ur tutorials are really simple to understand and geneterated a new interest in C programming,,,thnx a lottttttttttttttttttttttt.
biswa12341234 2 years ago 57
Exactly. I been trying to learn in C, but couldn't find any tutorial to keep me informed of what is going on. Next, I tried learning in BASIC, but found it too hard. Strangely, now I find C programming much easier with these tutorials. Hopefully I can master it. Great tutorials!
Titanium640 2 years ago
the hardest part for me was to find a good compiler. this one is awesome because it begins right in the beginning downloading the compiler the configuration and stuff
pliskinn0089 2 years ago
its kind of fun too. And if you ever plan on working with video games, you need to know C or C++
TheThissucks123 2 years ago
@biswa12341234 faggot.
Moisesireyes 3 months ago
i hate loops :O they are hard for me, iam never getting them
crta50 2 years ago
Posted a C++ version of the tutorial
samljer 2 years ago
Bucky Your tutorials are like of the pros.
kandelbiz 2 years ago
Thanks!
Smartformer 2 years ago
good job
selvaaai 2 years ago
Fine job. Not extemely high use of this though in the wild, as far as I can tell. But when its handy it really handy.
TechApplePie 2 years ago
while(1)printf("FAGGOT");
bigfaggykitty 2 years ago
nice
gary0110 2 years ago
1st
akillj 2 years ago