Google Add


Program to Print Hello World without using Semicolon - C, C++ Code

Write a C, C++ program to print hello world without using semicolon. In this tutorial, we are going to write a program which will print hello world using if-else, while and switch statements.

In c, c++ programming language every line ends with a semicolon, so it seems tricky how do you use printf  in C and cout in C++ without semicolon.

Java Program to Count Number of Digits in a Number

Write a Java program to count number of digits in a number. In this program, We take a number as an input and print the count of digit in a number.

Java Program to Count Number of Digits in a Number

Binary Search Program Using Recursion in C, C++

Write a C, C++ code to implement binary search program using recursion.

 What is Binary Search? 

Binary Search algorithm is used to search an element in a sorted array. Binary search works by comparing the value to the middle element of an array. If the value is found then index is returned otherwise the steps is repeated until the value is found.

It is faster than linear search.

Time complexity of Linear search is O(n).

Time complexity of Binary search is O(log(n)).

C Program to Implement a Stack Using Array

Write a C program to implement a stack using array. In this tutorial, You are going to learn the implement of stack data structure using an array.

What is a Stack Data Structure?

A Stack is a data structure in which insertion and deletion can be done from one end only. That's why it is also called LIFO(Last In First Out).

In stack, Insertion and deletion operation is known as push (Insertion) and pop (Deletion). While inserting and deleting an element in a stack we need to check some conditions.

For insertion, we need to check whether a memory is available, if memory is not available then it is known as stack overflow. Similarly, while deleting (pop operation) an element, if no element is present in a stack, then it is known as stack underflow.

Write a Program to Reverse a String Using Stack

Write a C, C++ program to reverse a string using Stack data structure. In this question, A string is input by a user and our program will reverse a string using a Stack.

Stack Data Structure

Stack is an abstract data type in which push (insertion) and pop (deletion) operations can be done at one end.  Stack is a LIFO (Last in First Out) data structure, which means element which is inserted at last must be the first one to be removed.

Some important articles regarding Stack data structure and it's implementation.