Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Interview question !!!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Mark Gordon, post: 1685250"] On Fri, 31 Oct 2003 06:20:27 GMT Don't delete the attributions for parts of the message you are replying to. It makes it harder to follow the thread. In which case you will not get any help with C from a lot of the more knowledgeable people on this group should you want any. Ever heard of registers? A *lot* of good compilers will store automatic variables in registers where possible rather than on the stack. I have a strong dislike of HTML for many reasons. I also dislike a lot of MS software for usability reasons. I only object to people not following project or company formatting standards since it can make reading the code harder. Now you are just insulting someone simply because they disagree with you. I suspect that Jack Klein does have a job. BTW, I'm only replying to ensure that anyone else reading this thread will see that you are spouting rubbish. To give you a specific and common example, gcc version 3.3.2 when used with the -O3 option. I did this and the compiler produced assembler code that did not use a local variable in main at all, instead it called fn then pushed 20 on to the stack. Therefor your suggestion would not have worked. My experience with compilers is that many of them will do this type of optimisation. My experience with various operating systems and hardware is that in at least some instances an attempt to smash the stack to modify the actual code (the only way you could do it if decent optimisation is performed by the compiler) is that it is not always possible to modify the code since it may be in memory that the running executable does not have write access to. Given such a common optimisation and write protected code it is not possible for the code to change what the printf in main will print on some systems, only to prevent it from reaching the printf. Possibly he felt that it had been answered correctly. Certainly his pointing out how wrong you are could be considered as helping the OP. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Interview question !!!
Top