Employers: discover CodinGame for tech hiring
CodinGame_Logo_Final_Full
ACTIVITIES
1
PRACTICE
COMPETE
1
LEARN
COMMUNITY
CONTRIBUTIONS
LIVE STREAMS
DISCORD
FORUMS
BLOG
Get a job
1
3
Log In
Sign Up
Does this work?
Anonymous
1,476 views
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include
<iostream>
struct
foo
{
// (a):
void
bar
() {
std
::cout <<
"gman was here"
<<
std
::endl; }
// (b):
void
baz
() { x =
5
; }
int
x;
};
int
main
()
{
static_cast
<foo*>(
NULL
)->
bar
();
//works
foo* f =
new
foo
();
f =
nullptr
;
f
->
bar
();
// (a)
f
->
baz
();
// (b) // use this pointer, will coredump
}
Enter to Rename, Shift+Enter to Preview
Run
0
0
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
Quiz 60
By
Unnamed contributor
1,590
2
1
Uniqueness Check
By
Unnamed contributor
1,408
0
0
Python Hello World program
By
SJTECollege
2,392
138
6
Correct the code to display 'Hello World!'
By
SJTECollege
3,079
137
3
CodinGame - Home
ABOUT US
CAREERS
PRIVACY
FAQ
CodinGame - Work
The #1 tech hiring platform
SCREENING
SOURCING
RETAIN
ABOUT US
CAREERS
PRIVACY
FAQ
Facebook
YouTube
Twitter
LinkedIn
FR
EN
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants
Keyboard Shortcuts:
?
Show / hide this help menu
×