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
Programming Articles - Page 3221 of 3366
573 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
809 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
180 Views
Yes! We can use a pass statement in a Python if clause. This is used when a statement is required syntactically, but you do not want any command or code to execute. It represents a piece of code that will be added later, but initially, a placeholder is required to ensure the program runs without errors. And the if statement in Python evaluates whether a condition is true or false. So, the pass statement can be used in an if as well as an else block. Pass Statement in If Clause In this section, we will see ... Read More
341 Views
So you've decided to learn how to program in C++ but don't know where to start. Here's a brief overview of how you can get started. Get a C++ Compiler This is the first step you'd want to do before starting learning to program in C++. There are good free C++ compilers available for all major OS platforms. Download one that suits your platform or you can use the tutorialspoint.com's online compiler on www.tutorialspoint.com/compilers/online-cpp-compiler.htm GCC − GCC is the GNU Compiler chain that is basically a collection of a bunch of different compilers created by GNU. You can download ... Read More
4K+ Views
C++ is a general-purpose and high-level programming language, which was created by Bjarne Stroustrup in the early 1980s. It is an extension of the C programming language, which means it has features of C (procedural programming) with the added feature of object-oriented programming. It has become a widely used language, especially in competitive programming and is supported on most platforms such as Windows, Linux, Unix, and macOS. Advantages of C++ Programming LanguageIn this article we will discuss the advantages of using C++ language: C++ is a highly portable language that supports multi-device and multi-platform application ... Read More
1K+ Views
C++ is known to be a very powerful language. C++ allows you to have a lot of control as to how you use computer resources, so in the right hands, its speed and ability to cheaply use resources should be able to surpass other languages. Thanks to C++'s performance, it is often used to develop game engines, games, and desktop apps. Many AAA title video games are built with C++.C++'s greatest strength is how scalable it could be, so apps that are very resource intensive are usually built with it. As a statically typed language, C++ is generally more performant ... Read More
256 Views
C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ program. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights. It has been used in the ... Read More