Category Archives: C++

Tricky C++ programs

Programming has never been easier. Even though you may have mastered a particular programming language, there might still be some concepts that may make you dizzy on reading it. This article contains some set of tricky questions which may make you go dizzy. 1. Take a look at this terminated int main (); What will this program do?… Read More »

Person left at the end

Given the value of N which represents the number of people standing in the queue, Each person has an id equivalent to their position. Now from this queue, the people who are at even locations are removed and made a separate queue. This process continues till 1 person left. The task is to determine the id of the… Read More »

Introduction To C++

C++ is a cross-platform language that can be used to create high-performance applications. C++ gives programmers a high level of control over system resources and memory. C++ was developed by Bjarne Stroustrup, as an extension to the C language. Language designers: Bjarne Stroustrup Language paradigms: Object-oriented program. There are various published Versions of C++ : C++98, C++03, C++11,… Read More »

Comments in C/C++

A comment is text that the compiler ignores but that is useful for programmers. Comments are normally used to annotate code for future reference. Comments are statements that are not executed by the compiler and interpreter. The compiler treats them as white space. It makes a program more readable and error finding become easier. One important part of… Read More »

Comparisons between C++ and C#

1. C++ Programming Language : C++, as we all know is an extension to C language and was developed by Bjarne stroustrup at bell labs. C++ is an Object Oriented Programming language but is not purely Object Oriented. The language was updated 3 major times in 2011, 2014, and 2017 to C++11, C++14, and C++17. C++ can be… Read More »

Vector of class objects in C++

Vector usually deals with primitive data types like int, string, double. However, there would be complexities and overhead arising when dealing with vector of class objects. For example, what will be output of below C++ program. How many constructors will be called here? How many constructors will be called? How many destructors will be called? The output of… Read More »

Career in C/C++

In this article, we will discuss the various opportunities available to a person who is well-equipped with the necessary skills in C / C ++ language. C and C ++ programming languages ​​are old, but still popular among computer science people. Even a person with a non-technical background has heard of these languages. C is popular due to… 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 »

C++ is the type of Object-Oriented Programming

OOP stands for Object-Oriented Programming. Procedural programming is about writing procedures or functions that perform operations on the data, while object-oriented programming is about creating objects that contain both data and functions. Object oriented programming languages are various but the most popular ones are class-based. Languages used in Procedural Programming: FORTRAN, ALGOL, COBOL, BASIC, Pascal and C. Languages… 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 »