PuzzlersWorld.com

  • Hacker Puzzle
  • Interview Puzzles
  • Number Puzzles
  • Maths Puzzles

Basic Concepts C/C++

(No Ratings Yet)

December 24, 2012 by puzzler Leave a Comment

These are the few pointer i made while i myself was preparing for C/C++ interviews. You might want to get these facts right into your mind as well, beware you might be asked some question based on these facts in the interview.

Please do comment what you feel about these? Do you agree with these?
If you have some more pointers to share with puzzlersworld.com user’s, please don’t hesitate.

Some Facts on C/C++

  1. Functions defined in a class are by default inline.
  2. Memory space for the members of a class is allocated when an object of that class is created, not before that(at declaration of the class).
  3. Compiler provides a zero argument constructor only when there is no other constructor defined in the class.
  4. Realloc can be used to reallocate the memory allocated using new operator.
  5. Size of the pointer does not depend on where it is pointing to, it is always the same.
  6. Copy constructor and assignment operators are provided by default by the compiler.
  7. When an object is passed or returned to/from a function by value the copy constructor gets called automatically.
  8. For a template function to work it is mandatory that its definition should always be present in the same file from where it is called.
  9. All static data members are initialized to zero.
  10. For every static data member of a class it should also be defined outside the class to allocate the storage location.
  • Share on Whatsapp
  • Share on Facebook
  • Share on Twitter
Facebook Comments
Next Puzzle
Subjective Question set C/C++ – Part 1

Checkout more Interview Questions Tags: C/C++, Solved Puzzles

Leave a Comment Cancel reply

Submit your Puzzle

You may also like

  • Subjective Question set C/C++ – Part 1
  • Consonants Solution: Google codejam 2013 Round 1C
  • 2nd smallest number from 32 numbers
  • Beautiful Strings solution: Facebook hacker Cup 2013 Qual Round
  • DS with insert, delete and getRandomElement in O(1)
  • Manage Your Energey Solution: Google codejam 2013 Round 1A
  • Dead Pixels solution: Facebook hacker cup 2013 Round 1
  • Cookie Clicker Alpha Solution – Google Code Jam 2014
  • Spinning Disc Direction Puzzle
  • Permutations solution: Facebook hacker cup 2013 Round 2

Get New Puzzles in your mailbox

Enter your email address and hit subscribe button.

Categories

  • Aive hi Puzzles
  • Akbar and Birbal
  • Alphabetical Puzzles
  • Bollywood Puzzles
  • Google Code jam
  • Hindi Riddles
  • Interview Puzzles
  • Interview Questions
  • Logical Puzzles
  • Malayalam Puzzles
  • Maths Puzzles
  • Miscellaneous
  • Number Puzzles
  • Picture Puzzles
  • Riddles
  • Tamil Puzzles
  • Technical

Social

  • View puzzlersworld’s profile on Twitter
privacy policy

Copyright © 2021 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in

  • Hacker Puzzle
  • Logo Puzzles
  • Optical Illusions
  • WhatsApp Puzzles
  • Picture Puzzles
  • Riddles
    ▼
    • Hindi Riddles
  • Bollywood Puzzles
  • Alphabetical Puzzles
  • Aive hi Puzzles
  • Interview Puzzles
  • Logical Puzzles
  • Interview Questions
    ▲
    • Data Structures
    • Binary Tree
    • Algorithms
    • Recursion Questions
    • Amazon Interview Questions
    • Snapdeal Interview Questions
    • Google Code jam
  • Technical
  • Akbar and Birbal
  • Number Puzzles
  • Maths Puzzles
  • Miscellaneous