As I said in this post, today I've found an interesting site about C++ programing practices.
While reading this pages I learned another way to write a fragile application (as always, writing bad code is enough :)
So, let's go for it! What will be the output of the following program?
void main(int argc, char* argv[])
{
int n = 255;
size_t size = sizeof(++n);
printf("%d", n);
}
Maybe this be can pretty obvious to you, but it was not to me (maybe because I avoid to write obscure code as much as I can :)
Adriano
Subscribe to:
Post Comments (Atom)
Categories-
- book (1)
- c# (27)
- C++ (2)
- COM+ (4)
- computador (10)
- computer (9)
- db4o (31)
- divertido (2)
- dotnet (16)
- editor textos (1)
- Free Software (2)
- fun (3)
- geral (5)
- hardware (4)
- home (1)
- java (3)
- livros (3)
- multithread (2)
- personal (16)
- powershell (1)
- programing (47)
- rant (1)
- security (3)
- segurança (2)
- Software (16)
- trip (1)
- utilitário (4)
- virus (3)
- vista (4)
- Visual Studio (2)
- what is wrong (1)
- windows (19)
- wix (1)
- work (19)

0 comments:
Post a Comment
Post a Comment