# C++ Programming Code Examples

## C++ > Data Structures Code Examples

### C++ Program to Implement Vector

C Program Sample Bubble Sort Algorithm -
Implementing bubble sort. Bubble sort is also known as sinking sort. This sorting algorithm compares each pair of adjacent items. Swaps them if they are in the Wrong Order, and this

C++ Language & One Time Pad Algorithm -
C++ program encodes any message using the technique of 'One time' pad cipher technique. Input is not Case Sensitive and works only for all characters. 'White Spaces' are not ignored

Singly Linked list Program Using functions -
In C++, under the simplest form, each node is composed of data and a reference ('a link') to the next node in the sequence. This structure allows for efficient insertion or removal of the

Find Twos Complement of Binary Number -
C program code to input binary number from user and find twos complement of the binary number. Twos complement of N-bit number is defined as the complement with respect to

Find Quotient & Remainder with Function -
In this program, we are doing the same thing that we have done in the above program, but here we're using functions in order to find the Quotient & Remainder. We have created two

Code Find Maximum Between 2 Numbers -
C program code to input two numbers and find maximum between two numbers using conditional/ternary operator ?:. How to find maximum minimum between two numbers

C Store Information Name Roll and Marks -
In this c program code, a structure, student is created. This structure has three members: name (string), roll (integer) and marks (float). Then, a structure variable s is created to store

C++ Language Add Digits of any Number -
To add digits of any number in C++, we enter the number to add their digits & displays the "Addition Result" of the digits of the entered number on the output screen as shown here