Whenever we are asked to write a program to copy one string to another string, we make use of inbuilt function- strcpy (). Obviously, it is the easy method and we can use that. But sometimes, we are asked not to use the strcpy (). This program helps to copy one String to Another string […]

# Category: C programs

This code print diamond pattern of stars. Diamond shape is as follows: * *** ***** *** *

Pascal Triangle is one of the most interesting number patterns. It is named after Blaise Pascal, a famous French Mathematician and Philosopher. To build the pascal triangle, we start with “1” at the top, then continue placing numbers below it in a triangular pattern. Each number is the two numbers above it added together except for the […]

This program checks whether an input alphabet is a vowel or not. Both lower-case and upper-case are checked i.e a, A, e, E, I, i, o, O, u, U. #include <stdio.h> #include <conio.h>

This program shows how to convert an infix expression to postfix expression. Before proceeding to program, first understand what is difference between infix expression and postfix expression. Infix notation: X + Y. Operators are written in-between their operands. Postfix notation (also known as “Reverse Polish notation”) : X Y + . Operators are written after […]

The following program prints first 10 automorphic number. I am giving you all brief introduction about what actually automorphic numbers are, assuming that some of you might not be aware about that. In mathematics an automorphic number (sometimes referred to as a circular number) is a number whose square “ends” in the same digits as number itself. For example, 52 = 25, 62 = 36, 762 = […]

/* Calculate Permutation and Combination (nCr and nPr) Using Function */ #include<stdio.h> #include<conio.h> void main()

/* Fibonacci series using recursion */ #include<stdio.h> #include<conio.h> void main() {

/* Program to draw pyramid of numbers displaying following Pattern */ /* 1 2 3 4 5 6 7 8 9 10 */

/* Q. program to produce the following form of Floyd’s Triangle. 0 10 010 1010 */ #include<stdio.h> #include<conio.h> void main()