Grieve (grieve) wrote,

Interview Questions

At my old job I used to interview would be candidates. We had a great set of interview questions, many of which were created by chikuru. Still I would often try to think of good interview questions on my own. One of my favorites was the following:

What does the following program print?

#include <stdio.h>

void main()
   float z = 7.2;
   int i = (int)z;
   int j = *((int*)(&z));


It was a good question to ask to see if people understood pointers, casting, and C/C++, but it was a little C/C++ specific.
Tags: programming

  • Science Tattoos

    I stumbled across this fascinating page which is a collection (at least links to a collection on Flickr) of tattoos about and inspired by science. I…

  • Whoops!

    I forgot renew my domain name this year, and lost it for a few days. Fortunately I was able to regain it before it was permanently released.

  • Physics and Photons

    A long time ago some co-workers and I were discussing a sphere (of any size really) made of a perfect one-way mirror, such that light (photons)…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.