{"id":38,"date":"2006-11-06T08:30:39","date_gmt":"2006-11-06T12:30:39","guid":{"rendered":"http:\/\/www.jrtwine.com\/blog\/?p=38"},"modified":"2008-03-31T17:30:19","modified_gmt":"2008-03-31T21:30:19","slug":"best-wtf-moments-correcting-the-tests-answers","status":"publish","type":"post","link":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/","title":{"rendered":"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers"},"content":{"rendered":"<p>In talking with a friend I was reminded of one of my favorite WTF moments &#8211; correcting the answers on an interviewer&#8217;s tech questions.  Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.<\/p>\n<p>When I asked about them it turns out to have been questions regarding the size of C++ objects that have no data members. For example:<\/p>\n<blockquote>\n<pre><strong>class CEmpty { };<\/strong><\/pre>\n<pre><strong>class CEmpty2 { <\/strong><strong>public:  void MyFunc( void ) <\/strong><strong>{ <\/strong><strong>return; <\/strong><strong>} }; <\/strong><\/pre>\n<pre><strong>class CEmpty3 { <\/strong><strong>public: virtual void MyFunc( void ) <\/strong><strong>{ <\/strong><strong>return; <\/strong><strong>} };<\/strong><\/pre>\n<\/blockquote>\n<p>So what is the size of <strong>CEmpty<\/strong>, <strong>CEmpty2<\/strong> and <strong>CEmpty3<\/strong>?  My answer was that it was basically implementation defined.  The interviewer&#8217;s answers said that <strong>CEmpty<\/strong> and <strong>CEmpty2<\/strong> had a size of zero, and that <strong>CEmpty3<\/strong> had a non-zero size. <\/p>\n<p>I had answered that <strong>CEmpty<\/strong> and <strong>CEmpty2<\/strong> will have a implementation-specific\/defined size (IME, a size of <strong>1<\/strong>) and that <strong>CEmpty3<\/strong> will have a size due to the <strong>vtbl<\/strong> that will be added to the class, and added that the size of the <strong>vtbl<\/strong> will <em><strong>not<\/strong><\/em> be added to the implementation-specific\/defined size given to otherwise empty objects.  (In other words, if the size of the <strong>vtbl<\/strong> pointer is 4 bytes, the object size will be 4, not 5.)<\/p>\n<p>The interviewer, being a\/the senior developer that I would have been working with or for, did not agree and we ended up with some code snippets being compiled and executed in the VC++ 6.0 IDE.  Wanna take a guess who was correct?<\/p>\n<p>It turns out that the company&#8217;s CTO decided not to accept me for the position.  I was never told why (I otherwise aced the interview, of course), but I was told that the CTO created the interview questions (and answers).  Go figure&#8230;!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In talking with a friend I was reminded of one of my favorite WTF moments &#8211; correcting the answers on an interviewer&#8217;s tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-developing"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer&#039;s tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"James R. Twine\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"James R Twine Blog -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer&#039;s tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2006-11-06T12:30:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2008-03-31T21:30:19+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer&#039;s tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#blogposting\",\"name\":\"Best WTF Moments \\u2013 Correcting the Test\\u2019s Answers - James R Twine Blog\",\"headline\":\"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers\",\"author\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\"},\"datePublished\":\"2006-11-06T08:30:39+00:00\",\"dateModified\":\"2008-03-31T17:30:19+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#webpage\"},\"articleSection\":\"Developing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"name\":\"Developing\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"position\":2,\"name\":\"Developing\",\"item\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#listItem\",\"name\":\"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#listItem\",\"position\":3,\"name\":\"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"name\":\"Developing\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\",\"name\":\"James R Twine Blog\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/\",\"name\":\"James R. Twine\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/77d36362e353ec1c88adc48b48055faee96497898a208d3a6a05897d4902e552?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"James R. Twine\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#webpage\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/\",\"name\":\"Best WTF Moments \\u2013 Correcting the Test\\u2019s Answers - James R Twine Blog\",\"description\":\"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer's tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/best-wtf-moments-correcting-the-tests-answers\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"datePublished\":\"2006-11-06T08:30:39+00:00\",\"dateModified\":\"2008-03-31T17:30:19+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\",\"name\":\"James R Twine Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog","description":"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer's tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.","canonical_url":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#blogposting","name":"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog","headline":"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers","author":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"publisher":{"@id":"https:\/\/jrtwine.com\/blog\/#organization"},"datePublished":"2006-11-06T08:30:39+00:00","dateModified":"2008-03-31T17:30:19+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#webpage"},"isPartOf":{"@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#webpage"},"articleSection":"Developing"},{"@type":"BreadcrumbList","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/jrtwine.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","name":"Developing"}},{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","position":2,"name":"Developing","item":"https:\/\/jrtwine.com\/blog\/category\/developing\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#listItem","name":"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#listItem","position":3,"name":"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers","previousItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","name":"Developing"}}]},{"@type":"Organization","@id":"https:\/\/jrtwine.com\/blog\/#organization","name":"James R Twine Blog","url":"https:\/\/jrtwine.com\/blog\/"},{"@type":"Person","@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author","url":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/","name":"James R. Twine","image":{"@type":"ImageObject","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/77d36362e353ec1c88adc48b48055faee96497898a208d3a6a05897d4902e552?s=96&d=mm&r=g","width":96,"height":96,"caption":"James R. Twine"}},{"@type":"WebPage","@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#webpage","url":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/","name":"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog","description":"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer's tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/jrtwine.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/#breadcrumblist"},"author":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"creator":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"datePublished":"2006-11-06T08:30:39+00:00","dateModified":"2008-03-31T17:30:19+00:00"},{"@type":"WebSite","@id":"https:\/\/jrtwine.com\/blog\/#website","url":"https:\/\/jrtwine.com\/blog\/","name":"James R Twine Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/jrtwine.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"James R Twine Blog -","og:type":"article","og:title":"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog","og:description":"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer's tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect.","og:url":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/","article:published_time":"2006-11-06T12:30:39+00:00","article:modified_time":"2008-03-31T21:30:19+00:00","twitter:card":"summary_large_image","twitter:title":"Best WTF Moments \u2013 Correcting the Test\u2019s Answers - James R Twine Blog","twitter:description":"In talking with a friend I was reminded of one of my favorite WTF moments - correcting the answers on an interviewer's tech questions. Once, while taking an interview for a position, the interviewer was going over my answers for the tech questions and happened to mention that one (or two?) of them were incorrect."},"aioseo_meta_data":{"post_id":"38","title":null,"description":null,"keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-09-17 06:46:54","updated":"2026-09-17 06:46:54"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jrtwine.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jrtwine.com\/blog\/category\/developing\/\" title=\"Developing\">Developing<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tBest WTF Moments \u2013 Correcting the Test\u2019s Answers\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/jrtwine.com\/blog\/"},{"label":"Developing","link":"https:\/\/jrtwine.com\/blog\/category\/developing\/"},{"label":"Best WTF Moments &#8211; Correcting the Test&#8217;s Answers","link":"https:\/\/jrtwine.com\/blog\/best-wtf-moments-correcting-the-tests-answers\/"}],"_links":{"self":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}