C Program to check matrix is magic square or not

Write a c program to check whether the given matrix is a magic square matrix or not. A matrix is magic square matrix, if all rows sum, columns sum and diagonals sum are equal. Example: 8   1   6 3   5   7 4   9   2 is the magic square matrix. As you can see …

C program to demonstrate ceil function.

Write a C program to demonstrate ceil function.ceil is in the C math.h library.ceil function rounds up the smallest next integral value.Example:ceil(2.0) is 2.0ceil(2.1) is 3.0ceil(2.2) is 3.0——ceil(2.9) is 3.0Read more about C Programming Language. /************************************************************ You can use all the programs on www.c-program-example.com* for personal and learning purposes. For permissions to use the* programs …

C program to draw a circle using c graphics.

Write C program to draw a circle using c graphics.In this program we use the graphics.h library function to draw a circle. To use graphics.h, we have to install the drivers in to the the system by using the initgraph() function. In the program circle is the graphic function , which takes three parameters, first …

C Program to compute the difference between two dates.

Write a C program to compute the difference between two dates.In this C Program, We check the date is valid or not and then calculating the No. of days of first date and second date from Jan 1 of first date, then subtract the smaller date from another. Read more about C Programming Language . …

C Program to implement Simpson method.

Write a C Program to implement Simpson method.Simpson method is used for approximating integral of the function.Simpson’s rule also corresponds to the 3-point Newton-Cotes quadrature rule.In this program, We use the stack to implement the Simpson method. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal …

C program to Demonstrate the Recursive function.

Write a C program to demonstrate the recursive function.Recursion  is the programming technique that a process invoking itself again and again. In this program, We reverse the given number and checks it is a palindrome or not. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal …

C program to count the leaves of the binary tree.

Write a C program to count the leaves of the binary tree.Binary tree is the ordered directed tree data structure, in which each node has at most two nodes.A node is called as a leaf node,  if it does not contains any child elements. In this program, We used the structures to create the binary …

C Program to demonstrate dynamic memory allocation example.

Write a C Program to demonstrate dynamic memory allocation example.Dynamic memory allocation means you can allocate or relocate (manipulate) the memory at the run time, using malloc, calloc, and realloc functions.Using malloc, We can allocate block of memory for a variableUsing calloc function, We can allocate multiple blocks of memory for a variable.We can alter, …

C program to generate and print prime numbers in a given range.

Write a C program to generate and print prime numbers in a given range. Also print the number of prime numbers.Prime number is a whole number and greater than 1, which is divisible by one or itself.Example: 2, 3, 5, 7, 11, 13………… Read more about C Programming Language . /************************************************************ You can use all …

C Program to find sum and product using macros.

Write C Program to find sum and product using macros.Macro is a piece of text that is expanded by the preprocessor part of the compiler. This is used in to expand text before compiling. Macro definitions (#define), and conditional inclusion (#if). In many C implementations, it is a separate program invoked by the compiler as …