>>1
All universities suck. You cannot learn programming from a university.
No programmer EVER writes code in paper.
He either uses vim or emacs. (Or MSVC, ew.)
How hard it is to cut off the internet in some computers?
Not hard at all.
If they wanted you to write code without compiling it they could just remove the access to the compiler.
>>7
Wrong. FFS, how do you think most bugs are being found to applications? nope, not when compiling but when people use them for stupid/weird things.
Take this for example
int main() {
char buffer[100];
fgets(buffer, 100, stdin);
printf(buffer);
return 0;
}
This is a basic 'echo' program with 2 problems.
1) the user might not enter a 0 eg
cat file | ./program
If `file' does not contain a null byte printf() will access unitiliazed elements of buffer. Those elements will contain what was before buffer in the stack, let's suppose there weren't any 0 bytes there too, then printf() will try to access buffer+100.. and propably get a segfault, except if it finds a null byte before it reaches unaccessed memory.
Also if the user enters more than 100 bytes, and the null byte is the 101th byte (let's suppose that) then 100 bytes will be written to the array and printf() won't find the null byte in those 100 elements of buffer.
2) If what the user enters contains format indentifiers, printf() will print things from the stack.
Solution?
int main() {
char buffer[100] = { 0 }; // zeroing all the elements of the array
fgets(buffer, 99, stdin);
printf("%s", buffer);
return 0;
}