I don't know. How many marks do I get? :P
Salem commented: Ha! +23
I don't know. How many marks do I get? :P
Hi Kelly, welcome to Daniweb! Do you mean you only know basic stuffs or the programming language basic?
just have some fried bee hoon and egg as my breakfast.
Hi Cohen welcome to Daniweb! So you guys know each other from another forum?
Hi welcome to daniweb! How about showing us your photography site when its ready?
Hi William welcome to Daniweb! I'm from Asia too.
Welcome to Daniweb! You sure have a lot of vocations.
Hi welcome to Daniweb! Perhaps you can put a link to your online community inside your signature?
Hi Shai, welcome to Daniweb!
Hi Santosh, welcome to Daniweb!
466
This has become a one-sided game.
Hi Anand, welcome to Daniweb! Feel free to contribute in the Java section.
Hi RobertSnaw, welcome to Daniweb!
Hi vernon, welcome to Daniweb!
Hi welcome to Daniweb! You can post whatever queries you have at the php section.
Hi welcome to Daniweb!
How about work full-time for a year or two before going for masters? The working experiences might change your perspective and help you make a better decision.
Hi welcome to Daniweb! Wow, you are still using Win 98SE and Win Me? That's so antique.....Win Me is one of the most problematic OS I have used, the other one happens to be Win Vista.
Nice intro there. Welcome to Daniweb!
Hi welcome to Daniweb! Have fun learning python.
It is equally rude to provide misinformation, and describing a trivial concern as a timebomb is misinformation - and, worse, misinformation that can deceive beginners. I certainly agree it is better not to place function declarations inside the scope of functions, but the consequences are pretty insignificant. Compiler errors (and handling them) are part of the normal learning process by which beginners build knowledge.
Read my statement again. I said "TO ME, putting function declarations inside main is just like a potential time-bomb, even if at this moment your functions do not call each other". Its a PERCEPTION. Its an OPINION. I don't think it's what you call a misinformation. You can say that you don't agree with my analogy, but you can say it in a less rude way.
Anyway, its really pointless to argue over this. Let's move on.
Oh, rubbish! Your description is excessive. The worst thing that can happen is that another function needs to call the declared function, and a compiler error occurs unless the function declaration is moved (to file scope) or replicated in the other function. A compiler error that can be eliminated with a simple copy or move of a line of code is hardly catastrophic, so does not warrant being described as a potential time-bomb.
It's up to individual's interpretation of what constitutes to a potential time-bomb. To a novice programmer, if he makes a habit of declaring functions inside main function because all the functions do not call each other and the program compiles properly, he may run into unwarranted compiler errors in future if the program expands. That's a bad practice that needs to nip it in the bud. It's easy to solve of course, but in the first place this problem could be avoided.
Oh, and I really think you are rude to describe other's comments as rubbish. That's plain rude and uncalled for.
I don't know about others but to me putting function declarations inside main is just like a potential time-bomb, even if at this moment your functions do not call each other.
Hi welcome to Daniweb! You can post your problem under Tech Talk, just select the subsection according to your relevant operating system.
Hi faith, welcome to Daniweb! Look around and maybe post for suggestion at the Computer Science section.
Go google "print hello world without semicolon". But its non Ansi C standard because it requires void main().
I am curious why you need to do these silly questions. If this is your assignment, help me ask your tutor.
int i = 1;
STUPID_ASSIGNMENT:
printf("%d\n", i);
if(i < 100)
{
i++;
goto STUPID_ASSIGNMENT;
}
Is this the kind of assignment teachers like to give nowadays?