
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7197 Articles for C++

204 Views
The function iswblank() is used to check that the passed wide character is blank or not. It is basically a space character and it also considers tab character(\t). This function is declared in “ctype.h” header file in C language and “cctype”” header file in C++ language.Here is the syntax of isblank() in C++ language, int iswblank(wint_t char);Here is an example of iswblank() in C++ language, Example Live Demo#include #include using namespace std; int main() { wchar_t s[] = L"The space between words."; int i = 0; int count = 0; while(s[i]) { ... Read More

785 Views
The function isblank() is used to check that the passed character is blank or not. It is basically a space character and it also considers tab character(\t). This function is declared in “ctype.h” header file in C language and “cctype”” header file in C++ language.Here is the syntax of isblank() in C++ language, int isblank(int char);Here is an example of isblank() in C++ language, Example Live Demo#include #include using namespace std; int main() { string s = "The space between words. "; int i = 0; int count = 0; while(s[i]) { ... Read More

92 Views
The function isprint() is predefined function and it checks that the passed characters are printable or not. It returns non-zero value, if successful otherwise, zero. This function is declared in “cctype” header file.Here is the syntax of isprint() in C++ language,int isprint(int character);Here,character − The character is to be checked.Here is an example of isprint() in C++ language,Example Live Demo#include #include using namespace std; int main() { int val1 = 28; int val2 = 's'; int val3 = ''; if(isprint(val1)) cout

8K+ Views
The size of void pointer varies system to system. If the system is 16-bit, size of void pointer is 2 bytes. If the system is 32-bit, size of void pointer is 4 bytes. If the system is 64-bit, size of void pointer is 8 bytes. Finding Size of a Void Pointer To find the size of a void pointer, you can use the sizeof() operator that accepts a data type, variable name, or any value and returns its size. In this case, you need to pass the name of the void pointer. Syntax Following is the basic syntax of void ... Read More

1K+ Views
In C++, both delete and free() are used to deallocate the dynamically created memory. In this article, we will learn about the delete operator and free() function with the help of examples. C++ delete Operator The delete operator is used to deallocate the memory. User has privilege to deallocate the created pointer variable by this delete operator. Syntax Here is the syntax of delete operator in C++ language: delete pointer_variable; Here is the syntax to delete the block of allocated memory: delete[ ] pointer_variable; Example Following is the example of delete operator to see its usage in memory ... Read More

5K+ Views
The return value of main() function shows how the program exited. The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value.In C++ language, the main() function can be left without return value. By default, it will return zero.Here is the syntax of main() function in C language, int main() { …. return 0; }Here is an example of main() function in C language, Example Live Demo#include int main() { int a = 10; char b = 'S'; float c = ... Read More

746 Views
There are so many C++ code formatter or beautifier tools which beautifies your code or format with proper indentation. The C++ code formatter/ beautifier are listed as follows − C++ Code Formatter/Beautifier Description Astyle This is a source code formatter. It can be used for C++, java and other languages. It’s latest version is 2.03 and it released in April 2013. Clang-Format It is a command line tool along with clang compiler. It is open- source tool and programmed in C++, python. The latest version is 3.3. Universal Indent GUI It ... Read More

412 Views
The function modf() is used to split the passed argument in integer and fraction. It is declared in “math.h” header file for the mathematical calculations. It returns the fractional value of passed argument.Here is the syntax of modf() in C language, double modf(double value, double *integral_pointer);Here, value − The value which splits into integer and fraction.integral_pointer − It points the integer part of argument after splitting.Here is an example of modf() in C language, Example Live Demo#include #include int main () { double val, x, res; val = 28.856; res = modf(val, &x); printf("Integral part of val ... Read More

320 Views
The function isgreater() is used to check that the first argument is greater than the second one or not. It is declared in “math.h” header file in C language. It returns true, if successful, otherwise false.Here is the syntax of isgreater().bool isgreater(value1 , value2);Here, value1 − This is the first argument which will be checked with value2.value2 − This is the second argument which is used to check value1 that is greater or not.Here is an example of isgreater().Example Live Demo#include #include using namespace std; int main() { int val1 = 28; int val2 = 8; bool result; ... Read More

1K+ Views
Increment operators are used to increase the value by one while decrement works opposite. Decrement operator decrease the value by one.Pre-increment (++i) − Before assigning the value to a variable, the value is incremented by one.Post-increment (i++) − After assigning the value to a variable, the value is incremented.Here is the syntax of i++ and ++i in C++ language,++variable_name; // Pre-increment variable_name++; // Post-incrementHere,variable_name −Name of the variable given by user.Here is an example of pre and post increment in C++ language,Example Live Demo#include using namespace std; int main() { int i = 5; cout