
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 33676 Articles for Programming

2K+ Views
A token is the smallest element of a C++ program that is meaningful to the compiler. The C++ parser recognizes these kinds of tokens: identifiers, keywords, literals, operators, punctuators, and other separators. A stream of these tokens makes up a translation unit. Tokens are usually separated by white space.The parser recognizes keywords, identifiers, literals, operators, and punctuators. Preprocessing tokens(like #include, #define, #if_def, etc.) are used in the preprocessing phases to generate the token stream passed to the compiler. The preprocessing token categories are header names, identifiers, preprocessing numbers, character literals, string literals, etc. that do not match one of the ... Read More

6K+ Views
There are several alternatives for compiling C++ on windows. Let's look at 2 of them:GCCTo install GCC on Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation program which should be named MinGW-.exe.While installing MinGW, at a minimum, you must install gcc-core, gcc-g++, Binutils, and the MinGW runtime, but you may wish to install more.Add the bin subdirectory of your MinGW installation to your PATH environment variable so that you can specify these tools on the command ... Read More

2K+ Views
Yes, In C++ both const and volatile keywords can be applied together in a variable. But it is used in situations like a read-only hardware register, or an output of another thread. In C++, they both are type qualifiers, which are used for different purposes in programming. In this article we will see the use of both keywords in C++. const Keyword The const keyword is used to declare the value of a variable as constant, meaning its value cannot be changed or modified later once initialized with const keyword. Example In this example PI value is set as constant ... Read More

819 Views
C++, also said to be a middle-level language, as it is a combination of both high-level features like abstraction with low-level language features like memory manipulation capabilities of assembly. It is a superset of C, as it compromises both C with object-oriented, therefore any valid C program will also be valid to C++ program.Top Features of C++ Programming Language C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. In this following article we will discuss some of the features of C++ that make it stand out among other programming languages: 1. ... Read More

722 Views
The const keyword in C++ is a keyword that is used to declare variables and objects as constant, which means the value declared using const cannot be changed or modified later, once they are initialized. This helps them prevent accidental modifications. For example, in a code, if we are using the value of PI, which has a fixed universal value and doesn't need any change, then we can declare it as a constant. When you declare the object with the const keyword, then the compiler places that value in ROM (Read-Only Memory), which protects it from being changed ... Read More

561 Views
The #define creates a macro, which is the association of an identifier or parameterized identifier with a token string. After the macro is defined, the compiler can substitute the token string for each occurrence of the identifier in the source file.#define identifier token-stringThis is how the preprocessor is used. The #define directive causes the compiler to substitute token-string for each occurrence of identifier in the source file. The identifier is replaced only when it forms a token. That is, identifier is not replaced if it appears in a comment, in a string, or as part of a longer identifier.example#include #define ... Read More

782 Views
In C++, variables can be declared as global or local depending on the scope of their declaration. Local variables are declared inside functions or blocks whereas global variables are declared outside all functions. Therefore their initialization behaviour also differs. In this article we will learn their different initialization behaviour in detail. Local Variable Initialization Local variables are the variables, which are declared inside a function or block (such as loops or conditionals) and are only accessible within that scope. By default local variables cannot initialize automatically, In case if you don't assign any value to that local variable, then it ... Read More

9K+ Views
C++ is a general-purpose, object-oriented programming language, which was developed by Bjarne Stroustrup at Bell Labs in the 1980s. It's an extension of the C language as it includes C features with additional object-oriented concepts like classes, inheritance, polymorphism, encapsulation, and abstraction.Before, it was known as "C with Classes" around 1979, but later renamed as C++ in 1983. These versions of the C++ language are compilers, which are implemented with the following rules made by the ISO C++ community, the community that looks over the development of the language. Here is the following list of C++ versions. ... Read More

1K+ Views
Both C and C++ are powerful programming languages that are used by developers to write both system-level and high-level programs. C language follows procedural programming paradigm with a simple and structured approach, whereas C++ supports both procedural and object-oriented programming. Although both C and C++ are widely used across various fields for developing different types of system and application software but they have different strength and use cases. In this article, we will learn when to use C over C++, and when C++ is a better choice than C. When to use C Language? When ... Read More

1K+ Views
Following are some of the differences between C and C++.When compared to C++, C is a subset of C++. All valid C programs are valid C++ programs.C is a structural or procedural programming language, while C++ is an object oriented programming language.In C, Functions are the fundamental building blocks, while in C++, Objects are the fundamental building blocks.C doesn't have variable references, while C++ has variable references.C uses malloc and free for memory allocation while C++ uses new and delete for memory allocation.C does not provide direct support for error handling, while C++ supports exception handling that helps in error ... Read More