Program to cyclically rotate an array by one

Cover Pic

Given an array, cyclically rotate the array clockwise by one.  Examples: Input: arr[] = {1, 2, 3, 4, 5} Output: arr[] = {5, 1, 2, 3, 4} Following are steps for Array Rotation.  Store last element in a variable say x.  Shift all elements one position ahead.  Replace first element of array with x. Output […]

C Program to implement Binary Search

C Program

We are given a sorted array of size n. We have to write program to find an element x in arr[]. In the previous post we have implemented linear search. Now we are going to implement another approach to search it. This approach is called Binary Search. Binary Search – Search an element in sorted […]

C Program to search an element in array


Write a C program to input elements in array and search whether an element exists in array or not. How to search element in array linearly in C programming. Logic to search element in array sequentially in C program. Example Input Input size of array: 10 Input elements in array: 10, 12, 20, 25, 13, […]

Types of Variables in C

A variable is a name of the memory location. It is used to store data. Its value can be changed, and it can be reused many times. It is a way to represent memory location through symbol so that it can be easily identified. Let’s see the syntax to declare a variable: There are 5 types of […]

How to host a static website on Github

How to host a static website on Github

What is Github? GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. You can host static website on github This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. You’ll create your own Hello World repository and learn GitHub’s Pull Request workflow, a […]

Virtual Function in C++

Virtual Function in C++

A virtual function is a member function of the parent class that is defined by using the “virtual ” keyword. These functions derived by the child class and call by the pointer or object of the parent class. And execute the derived class of the function.

CRUD Operation in Mongo-cxx

CRUD Operation in Mongo-cxx

What is CRUD operation ? Basically this term use in the database (like SQL,Mongo etc). 2. In Database we generally perform four operation : C – Create : It will be perform create database by Inserting data . R – Read : It will be perform Read operation of database. U – Update : It […]

%d bloggers like this: