Binary Search in C

A binary search is a simplistic algorithm intended for finding the location of an item stored in a sorted list. There are a few variations to the binary search in C program, such as testing for equality and less-than at each step of the algorithm.

Binary search in C is an example of a simple process that can be used to dissolve complex problems. As such, it is an important foundational concept that you will find in almost all the good books on the C programming language.

Read more

Best C and C++ Books

C and C++ are two of the most popular programming languages used around the world. While C is a core language, C++ is an extension of the C language. The possibilities are endless with these languages, which is why ventures of all shapes and sizes employ them due to its scalability and viability. As the languages stay on top, the number of people learning it is increasing by the minute. If you wish to learn C and C++, then starting it all with a book is a great idea. We have curated a list of the 5 best C books & 5 best C++ books recommended by the programming community. Irrespective of your programming proficiency, you will find a book that will suit your requirements.

Read more

Merge Sort in C

Merge sort is one of the most powerful sorting algorithms. Merge sort is widely used in various applications as well. The best part about these algorithms is that they are able to sort a given data in O(nLogn) complexity as against O(n2) complexity (we will soon see how) of bubble sort and selection sort. Moreover, merge sort is of interest because it creates an excellent case study for one of the widely used techniques in Computer Science – divide and conquer.

Read more

Bubble Sort in C

Sorting of data is one of the most fundamental, yet an important problem in computer science. Sorting forms a great case study for those who want to learn Data Structures and Algorithms.

What is Sorting – Definition

Often in real life, we are supposed to arrange data in a particular order. For instance, during our school days, we are told to stand in the queue based on our heights. Another example is of the attendance register at school/college which contains our names arranged in the alphabetical order.

Read more

C++ Language

C++ is a high-level object-oriented programming language that helps programmers write fast, portable programs. C++ provides rich library support in the form of Standard Template Library (STL).

C++ Language Features

Some of the interesting features of C++ are:

  • Object-oriented: C++ is an object-oriented programming language. This means that the focus is on “objects” and manipulations around these objects. Information about how these manipulations work is abstracted out from the consumer of the object.
  • Rich library support: Through C++ Standard Template Library (STL) many functions are available that help in quickly writing code. For instance, there are standard libraries for various containers like sets, maps, hash tables, etc.
  • Speed: C++ is the preferred choice when latency is a critical metric. The compilation, as well as the execution time of a C++ program, is much faster than most other general purpose programming languages.
  • Compiled: A C++ code has to be first compiled into low-level code and then executed, unlike interpreted programming languages where no compilation is needed.
  • Pointer Support: C++ also supports pointers which are widely used in programming and are often not available in several programming languages.
Read more