- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 34494 Articles for Programming
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
250 Views
C++11 is a version of standard C++ language. It was approved by International Organization for Standardization (ISO) on 12 August 2011 then C++14 and C++17. C++11 makes several additions to the core language. Visual C++ implements the vast majority of features in C++11. Some of the following C++11 features in Visual Studio 2015 − nullptr − In the previous nullptr, zero used to be the value and it had a drawback ofimplicit conversion to integral value. The null pointer literal is represented by std::nullptr_t. In this nullptr, no implicit conversion exists. Lambdas − The lambda expression allows to ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
2K+ Views
malloc()The function malloc() is used to allocate the requested size of bytes and it returns a pointer to the first byte of allocated memory. It returns null pointer, if it fails.Here is the syntax of malloc() in C language, pointer_name = (cast-type*) malloc(size);Here, pointer_name − Any name given to the pointer.cast-type − The datatype in which you want to cast the allocated memory by malloc().size − Size of allocated memory in bytes.Here is an example of malloc() in C language, Example Live Demo#include #include int main() { int n = 4, i, *p, s = 0; ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
2K+ Views
new/ deleteThe new operator requests for the memory allocation in heap. If the sufficient memory is available, it initializes the memory to the pointer variable and returns its address.The delete operator is used to deallocate the memory. User has the privilege to deallocate the created pointer variable by this delete operator.Here is an example of new/delete operator in C++ language,Example Live Demo#include using namespace std; int main () { int *ptr1 = NULL; ptr1 = new int; float *ptr2 = new float(299.121); int *ptr3 = new int[28]; *ptr1 = 28; cout
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
215 Views
The string literals are the set of characters which is enclosed in double quotes(“ “). Wide-string literals are prefixed with L always.Types of string literals −Sr.No.String Literals & Description1“ “Unprefixed string literal2L” “Wide-string literal3u8” “UTF-8 encoded string literal4u” “UTF-16 encoded string literal5U” “UTF-32 encoded string literal6R” “Raw string literalHere is an example of string literal in C++ language,Example Live Demo#include #include #include using namespace std; int main() { wchar_t s[] = L"hello world!"; wcout
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
2K+ Views
Global variables are declared and defined outside any function in the program. They hold their values throughout the lifetime of program. They are accessible throughout the execution of program.Non-const global variables are evil because their value can be changed by any function. Using global variables reduces the modularity and flexibility of the program. It is suggested not to use global variables in the program. Instead of using global variables, use local variables in the program.Use ‘g_’ as prefix of the variable name to avoid the naming collisions and for knowledge that variable is global. There is another way also that ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
122 Views
C++11 is a version of standard C++ language. It was approved by International Organization for Standardization (ISO) on 12 August 2011 then C++14 and C++17. C++11 makes several additions to the core language. There are some of the new changes introduced in C++11 − nullptr − In the previous nullptr, zero used to be the value and it had a drawback of implicit conversion to integral value. The null pointer literal is represented by std::nullptr_t. In this nullptr, no implicit conversion exists. Lambdas − The lambda expression allows to define functions locally. Anonymous functions are known as lambda. We ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
32K+ Views
Vectors are similar to the dynamic arrays but vectors can resize. Vectors are sequence containers that can change their size according to the insertion or deletion of elements. Containers are the objects which holds the data of same type.Vectors may allocate some extra storage for the future growth of elements in the vector. Vector elements are stored in the contiguous memory. The data is entered at the end of vector.Here is an example to print the contents of a vector in C++ language,Example Live Demo#include #include void print(std::vector const &a) { std::cout
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
220 Views
The following are some of C++ IDEs for linux − Eclipse Galileo with CDT Plugin Eclipse is a well-known open source and cross platform IDE. It provides full functional C/C++ IDE with the following features − Code editor with support for syntax highlighting Support for folding and hyperlink navigation Source code refactoring plus code generation Tools for visual debugging such as memory, registers etc. NetBeans IDE NetBeans is free, open source and popular IDE for C/C++. These are some of its features − Support for automatic packaging of compiled application into .tar, .zip and many more archive ... Read More