C++ Q/A Part 1

on 4:14 AM

Introduction

Some good C++ questions to ask a job applicant,

How do you decide which integer type to use?


Full Content

  1. What should the 64-bit integer type on new, 64-bit machines be?
  2. What’s the best way to declare and define global variables?
  3. What does extern mean in a function declaration?
  4. What’s the auto keyword good for?
  5. I can’t seem to define a linked list node which contains a pointer to itself.
  6. How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
  7. How can I declare a function that returns a pointer to a function of its own type?
  8. My compiler is complaining about an invalid redeclaration of a function, but I only define it once and call it once. What’s happening?
  9. What can I safely assume about the initial values of variables which are not explicitly initialized?
  10. Why can’t I initialize a local array with a string?
  11. What is the difference between char a[] = “string”; and char *p = “string”; ?
  12. How do I initialize a pointer to a function?

0 comments:

Post a Comment