↓
 
Visit the Swedish version ...
Blog Off

Blog Off

Mixed thoughts

  • Ideas
  • Mathematics
  • Music
  • Logic
  • Programming
  • About the blogger

Category Archives: Programming

An exercise in C++

Blog Off Posted on 4th June 2009 by Simon Jensen27th December 2019  

“Learning by teaching“
(Jean-Pol Martin)

Before I began teaching C++, I was convinced that I had a good command of C++ and that I knew all the theoretical aspects of this extensive programming language.

But unforeseen questions from my bright students woke me up.

Today, hundreds of lectures and lessons later, I dare say that I know C++. Thanks to the fact that I was learning by teaching!

So let me begin this category with a theoretical exercise for all professional programmers:

Consider the following expression in C++:

(1==0)["0==1"]

Which value has this expression?
What is the data type of the expression?
Why?

Posted in Programming | Leave a reply
©2021 - Blog Off
↑