## Write a program to make star pattern Pyramid.

Hey Guys 🙂 , today i am going to tell you the tricks to make star pattern like pyramids. Suppose we have to make pattern like * ** *** **** So here are the steps to make pattern like this as; Step 1: count the depth or number of levels in a […]

## Write a program to create table of any number.

import java.util.Scanner; public class Main {     public static void main(String[] args) {         Scanner scan = new Scanner(System.in);                  System.out.println(“Please enter a number, for which you want to write a table:”);         int number = scan.nextInt();                  for(int count=1; […]

## Write a program to find length and sum of digits in a number.

Lets first figure out the logic of getting digits of a number, once we get the digit we can count them and also find addition. suppose we have a digit= 543374. lets figure out it as; Step 1: reminder = 543374%10 = 4 digit =543374/10 =54337     (1 digit) Step […]

## Write a program to find digits in a number.

Hey guys, writing a code is not a tough if you know the logic and you can write it at your own in any computer language that you know. so first we figure out the logic of getting digits of a number. suppose we have a digit= 234. lets figure […]

## Pointers in C

What is Pointer? this is a question who trouble many of us, so i decide to write on it, hope it helps you 🙂 When we define a variable in c or whatever language, the compiler will find unused/vacant location in memory and allocate that to variable, to use. As we know […]

## Write a program for binary searching in c

Binary search:  Binary search is less time taking than linear search as it starts in the middle of a sorted array, and determines on which side the value is. Steps for binary search algorithm: Firstly before applying direct searching on array, we have to sort the array. for sorting algorithm you […]

## Write a program for creating and writing in a csv file in c.

File Handling : It  is a way of performing operation on file using C language. operations are  like creation of file, writing, appending, reading and etc. here is code given below for creating and writing into that file. Enjoy 🙂   #include<stdio.h> #include<string.h> // function for creating and writing in file void […]

## Write a program for Bubble Sort in c.

This is a very basic method to sort an array works on swapping of adjacent elements if they are not in a order. we can sort array whether in ascending or descending order. suppose we have an array; here length of array tell us how many time comparison and swapping […]

## Linear search using array in C

Linear Search : It is simplest form of searching of a item in a array. let suppose we have an “array arr “. arr[6] = { 1, 3, 4, 5, 6, 7 };   and want to search an “element item ” in our array arr. item = 5 ; […]

## Elements of C

Identifiers: All the words that we will use in c are keywords or identifiers. keywords are predefined and can’t be changed by the users, While identifiers are used to give names to entities likes variables, arrays, functions and etc. There are some rules naming identifiers as: The name should consist […]