Author: M. Saqib

C++ Vector – std::vector – A Complete Guide with Examples and Programs

Vectors in C++ are highly versatile sequence containers that provide dynamic resizing and efficient memory management. This guide covers topics ranging from vector initialization to advanced techniques for vector manipulation and acts as a comprehensive resource for developers who want to deepen their understanding of this essential container in C++.

Read More

Top 10 Prestigious Programming Contests and Coding Competitions

This is a list of 10 most prestigious and old programming contests and challenges which you can participate and win prizes. Most of them are annual competitions but few are continuous and you can enter at any time. You can use C, C++, Java or C# .NET or any other programming language in these contests.

Read More

C++ Program to Solve the Quadratic Equation

This program will solve quadratic equations. It accepts coefficients of a quadratic equation from the user i.e. a, b and c and displays the roots. To compile the program name it quadratic_solver.cpp then type g++ -o quadratic_solver quadratic_solver.cpp You may need to use math.h like this: #include if you are using windows C++ programming software. (I tried it without the math.h and got an “undeclared identifier” error)

Read More

C Algorithms Library

This article is about a collection of common Computer Science algorithms which may be used in C projects. The C Programming Language has a much smaller Standard Library as compared to other more modern programming languages such as Java or Python. The library provides a basic set of mathematical functions, string manipulation, type conversions, and file and console-based I/O.

Read More

Multiparadigm Programming in Standard C++

A multi-paradigm programming language allows programmers to choose a specific single approach or mix parts of different programming paradigms. The power of C++ is such that it can be used to implement any paradigm. It supports procedural and class based object oriented programming as well as there is functional programming support in the modern standard library versions. The free-form nature of C++ can also be used to write obfuscated C++ which in one context can be seen as artful control over the language.

Read More

Ternary Operator with examples in C

In C Programming, ternary operator allows executing different code depending on the value of a condition. The returned value is the result of the expression when the code is executed. The main advantage of using ternary operator is to reduce the number of lines of code and improve the performance of application. In C, the real utility of ternary operator is that it is an expression instead of a statement i.e. you can have it on the right-hand side (RHS) of a statement. So you can write certain code statements more concisely.

Read More

C++ “Hello World” Program

Typically, the best way to learn programming is by writing code. The first program beginners write is “Hello, World!” which is often used to illustrate the syntax of a programming language. You can take a look at the list of Hello World Programs in 300 Programming Languages to see how “Hello, World!” looks like in different programming languages.

Read More