answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is null printer in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What does malloc return in C and C plus plus?

Address of the allocated area, or NULL.


C plus plus code to find the length of a string without using function?

int i = 0; while(str[i] != NULL){ i++; }


What is the difference between a C plus plus string and a C-style string?

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.


What is called pointers-c plus plus?

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.


What is the difference between a null pointer and a null macro?

Using a NULL macro to make C portableI'll assume that you're asking your question for C type language programming. A NULL pointer is a pointer that's guarnteed to point to nothing. This may be 0 in a UNIX/Linux system or some other address in another system. Using the NULL macro to set/initialize your pointers will make your programs more portable among systems than using something like the 0.#include char *c = 0; // initialize to NULL--not portablechar *p = NULL; // initialize to NULL as defined in stdio is portableAddendumThe code:char *c = 0;actually is portable because the compiler converts 0's used in a pointer context (cast to a pointer) to the machine's representation of a NULL pointer, which may or may not be all 0 bits. The NULL macro itself might be defined as something like 0 or (void *)0, and both definitions are portable. As a corollary, the following code is also portable:if (!c) {// do something}because it is equivalent to:if (c != 0) {// do something}and the 0 above is converted to a NULL pointer because it is being compared with a pointer.

Related questions

What does malloc return in C and C plus plus?

Address of the allocated area, or NULL.


Why you use zero instead of NULL in c plus plus?

In C++ NULL is defined as 0. It's a design failure, will be fixed with a new 'nullptr' keyword.


What is null object in c plus plus?

a pointer that is not pointing to anything


What is literal in c plus plus?

Examples: 1, -1, -2.5, 'a', "Hello", NULL


What is the C program to print strings from A to Z and a to z?

#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; }


How do you check Address of integer in c plus plus?

void myfun (int *pi){if (i==NULL) printf ("check failed");}


C plus plus code to find the length of a string without using function?

int i = 0; while(str[i] != NULL){ i++; }


How do you bring up a HTML document for a Windows Vista?

From a C-program?ShellExecute (NULL, "open", "C:\DIR\INDEX.HTML", NULL, NULL, SW_SHOW);


What is the difference between a C plus plus string and a C-style string?

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.


In PHP a null value plus a number value is equals to what result. example null plus 6 equals?

In php mathmatical operations treat null like 0, so any number plus null equals itself. For example #!/usr/local/bin/php printf ("%d\n", null+6); printf ("%d\n", 6+null); ?> output: 6 6


How will you declare null pointer in C?

#define NULL ((void *)0) /* defined in <stddef.h> */ const char *mynullvar = NULL;


What is the largest number in a data set?

It's the maximum.Probably C, the continuum.The cardinality (count) of the infinite set of integers is Aleph-null. Then C = 2^(Aleph-null).