Tag Archives: CPP-Basic

Strings in C

In this article, you’ll learn about strings in C programming. Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’. Example : char name[] = “first name” ; Declaration of strings : When the compiler encounters a sequence of characters enclosed… Read More »

Union in C

In this article, you’ll learn about unions in C programming. More specifically, how to create unions, access its members and learn the differences between unions and structures. User defined data type : Union Like structures in C, union is a user defined data type. In union, all members share the same memory location. Unions are conceptually similar to… Read More »

Structures in C

A structure is a user defined data type in C. A structure creates a data type that can be used to group items of possibly different types into a single type. Structure is similar as Array, but only difference is that array allows only similar data type that can be stored in contiguous manner, but structure can stores… Read More »

Data Types in C | Set 1

Data types define the type of data a variable can hold. C language has some predefined set of data types to handle various kinds of data that we can use in our program. These datatypes have different storage capacities. In C programming, data types are declarations for variables. This determines the type and size of data associated with… Read More »

Loops in C | Set 2

Loops are very useful when you want to perform a task repeatedly. Loops are used to execute a set of statements repeatedly until a particular condition is satisfied. A loop consists of two parts, a body of a loop and a control statement. The purpose of the loop is to repeat the same code a number of times.… Read More »

Constants in C | Set 2

Prerequisite – Constants in C Constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types. Types of Constant in C : C supports several types of constants in C language as Character Constants, i.e., Single Character Constant,… Read More »

‘static’ keyword in C++

Almost each & every object oriented programming language is equipped with a special feature known as ‘static’ keyword. ‘static’ is such a keyword which can be used or written in front of any member variable or member function of a class. Now, what happens to that member variable or function if it is preceded by that ‘static’ keyword?… Read More »

Features Introduced in C++ 14

C++ 14 was planned as a minor release to complete the work that produced the C++11 standard, with the aim of becoming a cleaner, simpler, and faster language. Improvements in C++ 14 are “deliberately less” compared to C++ 11, says C++ creator Bjarne Stroustrup. 1. Binary Literals : Binary literals provide a convenient way to represent a base-2… Read More »

Why Learn C++?

C++ is known to be a very powerful language. It is often used to develop game engines, games, and desktop apps. Many AAA title video games are built with C++. Students and working professionals should learn the C++ language to become great Software Engineer. These are top reasons to learn C++. It’s easy for a coding beginner to… Read More »

Similarities between Java and C++

Java and C++ are the two most popular programming languages. Although they have many differences, there are quite a lot of similarities between them. Let us look into the similarities between Java and C++. 1. Comments Comments are same in C++ and Java. Single line comments are done by // and multiple line comments are done by /*…..*/… Read More »