r/programminghelp • u/UniqueViolinist1111 • Aug 18 '21
C++ Undefined behavior in cpp
Hey everyone,
I just start to learn cpp at my school and there is one notion I don't understand that much. Some teachers gives an function to complete and they say the function can have an undefined behavior. I read some articles and I don't understand it really well soo if anyone can help me to understand it with some exemple it would be very kind, thx guys
5
Upvotes
2
u/[deleted] Aug 18 '21
Take a look at the definition given here: https://en.cppreference.com/w/c/language/behavior
See also: https://en.cppreference.com/w/cpp/language/ub