|
|
|
|
![]() ![]() |
Feb 1 2005, 02:08 AM
Post
#11
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 85 Joined: 27-December 04 Member No.: 2,976 |
CODE void fun(void) { return 0; } XD Who wants it to print 20 lets just end the program now! |
|
|
|
Feb 1 2005, 02:11 AM
Post
#12
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 399 Joined: 14-November 04 From: Elysium Member No.: 2,280 |
8bit, you can't do that (can have only 1 return 0;)
Cse-icons you devil, who the hell would do that? Just playing around of course, I didn't get it. I'm too practical |
|
|
|
Feb 4 2005, 01:37 AM
Post
#13
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 85 Joined: 27-December 04 Member No.: 2,976 |
CODE void fun(void) { int * ptr =&i; *ptr=50; } Beat that. |
|
|
|
Mar 31 2006, 07:33 AM
Post
#14
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 81 Joined: 29-March 06 From: New Delhi, India Member No.: 20,918 |
CODE void fun(void) { int * ptr =&i; *ptr=50; } Beat that. i dont know c, but c++. In c++, you cant access i anywhere else but main() |
|
|
|
Apr 23 2006, 03:21 AM
Post
#15
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 23-April 06 Member No.: 22,313 |
void fun()
{ int i=0; while(true) i++; } overflow and program will end... or user will kill the program after waiting for a bit. -------------------------------- void fun() { int *i=0; while(true) *(i++)=i; } same as above plus there is a chance that program corrupts some critical data and crashes |
|
|
|
Apr 23 2006, 06:09 PM
Post
#16
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 106 Joined: 1-April 06 Member No.: 21,148 |
How do I manipulate and change the value of i? Technically you aren't changing the value of i -- you're defining a new i (it's at a new memory address). To answer your puzzle, you can change the value of i using an ASM injection attack using a noop sled to compensate for the variance in memory allocation addresses. |
|
|
|
Dec 13 2007, 03:53 AM
Post
#17
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
Need help... Need a program on turbo see (the theme is christmas)... Newbie at turbo see...
|
|
|
|
Dec 13 2007, 06:39 AM
Post
#18
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 74 Joined: 2-June 07 Member No.: 44,080 |
QUOTE 8bit, you can't do that (can have only 1 return 0;) The reason why he can't do it is because the return type is void, but if it was int like this: int fun(void) { } then he can do it. |
|
|
|
Dec 13 2007, 06:12 PM
Post
#19
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 190 Joined: 20-April 06 From: from the Dumpster in the back Member No.: 22,158 |
Oh yea?
void fun(void) { randomlineofetext(3249830325) } the program won't print anything at all xD |
|
|
|