a pointer that is not pointing to anything
Address of the allocated area, or NULL.
In C++ NULL is defined as 0. It's a design failure, will be fixed with a new 'nullptr' keyword.
Yes, C++ has pointers, which are references to memory locations. which are variables that store memory addresses, or NULL (zero). If the pointer is non-NULL, the pointer is said to dereference the object (or variable) residing at the stored memory address, which permits indirect access to that object so long as the object remains in scope.
An object in C++ is an instance of a C++ class.
There is no such thing as a null printer in C++. You are perhaps thinking of the null device to which output can be redirected from the command line (effectively hiding the output of a program). However this has nothing whatsoever to do with C++, it is entirely dependant upon the operating system.
A std::string is an object that encapsulates an array of type char whereas a C-style string is a primitive array with no members. A std::string is guaranteed to be null-terminated but a C-style string is not.
Examples: 1, -1, -2.5, 'a', "Hello", NULL
depends what you use it for. c++ = object oriented c = not object oriented
No; C++ is not 100% object oriented.
An object is simply an instance of a class.
#include<stdio.h> int main (void) { char upper[27]; // A-Z plus null terminator char lower[27]; // a-z plus null terminator char c; int i; for (i = 0, c = 'A'; c <= 'Z'; ++c, ++i) { upper[i] = c; lower[i] = c - 'A' + 'a'; } upper[i] = 0; // null-terminator lower[i] = 0; // null-terminator printf ("%s\n", upper); printf ("%s\n", lower); return 0; }
C++ is object-oriented. It is not object-based because, like C before it, C++ supports the principal of primitive data types, which are not object-based.