Pages

Showing posts with label C. Show all posts
Showing posts with label C. Show all posts
How to Compile and Execute C program in Linux

How to Compile and Execute C program in Linux

Linux is very popular OS in these days mostly among programmers and other sectors. We discuss how to compile and execute C program in Linu...

0 Comments
Finding LCM and HCM of Two Number in C

Finding LCM and HCM of Two Number in C

In this example, we are going to find LCM and HCM of two integer. Source Code: #include <stdio.h> #include <conio.h> int...

0 Comments
Manipulating Array using Pointer in C

Manipulating Array using Pointer in C

In this example, we get sum and average of an array element using pointer. We use pointer to point to the first element of an array then w...

0 Comments
Generating Multiplication Table from 1-12 in C

Generating Multiplication Table from 1-12 in C

This program gives you some idea of formatting the output in C. Here we have used %4d for printing the number. The number 4 defines the wid...

0 Comments
Program to find Smallest and Biggest Number with it's position in C

Program to find Smallest and Biggest Number with it's position in C

In this example we track the smallest and biggest number in an array with it's position. The main logic behind it is first we consider ...

0 Comments
Find Greatest and Lowest Number using Ternary Operator in C

Find Greatest and Lowest Number using Ternary Operator in C

This program give you some idea to use ternary operator in C. We can use this operator in place of IF....ELSE. In this example we use this ...

0 Comments
Convert Decimal to Binary in C

Convert Decimal to Binary in C

We all know how to convert Decimal number to Binary number. This example shows you how to implement that logic into our program. We simply ...

0 Comments
Simple Menu Driven program in C

Simple Menu Driven program in C

This program give you an idea to design your own menu driven program in C/C++. To fulfill our requirement we use Switch case for selecting...

0 Comments

Program to get Transpose Matrix in C

We can get the transpose matrix my interchanging row to column and column to row of a matrix. Source Code: #include <stdio.h> #...

0 Comments

Program to determine Friendly number in C

Friendly number is such number whose sum of the divisor is exactly divisible by that number. Source Code: #include <stdio.h> #in...

0 Comments

program to generate Fibonacci series using Recursive function in C

This program can generate Fibonacci series of any number: Source Code: #include <stdio.h> #include <conio.h> int fibo(in...

0 Comments

Program to check Armstrong number in C

The number whose sum of the cube of each digit is equal to the number is called Armstrong number. This program show you how to calculate an...

0 Comments

Sorting array in ascending order in C

The following program shows how to sort a linear array in ascending order of any size. You can sort the same array in descending order from...

0 Comments

Program to find Leap year

We can determine the leap year by applying the condition whether the given year is divisible by 4 and not divisible by 100 or given year is...

0 Comments

Testing Palindrome in C

Palindrome is a word, phrase, number or other sequence which has same form before and after reversing it for example mom, 5775 etc. Here if...

0 Comments

Factorial Number using Recursive Function in C

This program calculate the factorial of given number. factorial.c include <stdio.h> include<conio.h> int fact(int n) { ...

0 Comments

Determining whether the given number is prime or not in C

This program test the prime number. #include <stdio.h> #include <conio.h> void main() {      int num, i, c = 0;      pr...

0 Comments

Generating Prime Number in C

This is an example of generating prime number. It takes input form user and generate prime number upto given number. The main logic behind ...

0 Comments