# Category: C interview programs

## pattern 7: Pyramid Star pattern program in C Language

Write a C Program to print below pattern ( Pyramid pattern ) : * * * * *...

## Fibonacci series Program in C | C program to generate Fibonacci Series up to given Number

Description : A series of whole numbers in which each number is the sum of the two preceding...

## Area of Triangle Program in C Language | write a C program to calculate Area of Triangle

Formula to Calculate Area of Triangle : Area = ½ × b × h b = baseh =...

## Silly Codes : C Program to Perform Arithmetic Operations on Given Integers | Arithmetic operations C program

/******************Program****************/

/******************OUTPUT****************/ Related Reading : C program to test Leap year  C program to Find Area and...

## Power of 2 program in C | c program to test given number is power of two or not

Program : #include<stdio.h> main() { int i,var; printf(“Eneter a integer :”); scanf(“%d”,&i); var=1; Label: var=var*2; if(var<i) goto Label; if(var==i) printf(“given integer...

## Factorial Program in C | C program for Factorial of a Number

Factorial :In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For...

## Write a program to check that the input string is a palindrome or not

/******* Program **********/ #include<stdio.h>#include<string.h>main(){        char str;        int i,j,len,cnt;        cnt = 0;         printf(“Enter string to test :”);        scanf(“%s”,str);...

## Calculating Prime Numbers upto Given Number

Program #include<stdio.h>main(){ int n,i,j,cnt=0; printf(“Enter Any No :”); scanf(“%d”,&n); for(i=1;i<=n;i++) { cnt = 0; for(j=2;j<i;j++) { if(i%j ==...

## C program to SWAP two numbers without using temporary variable | Swapping of two numbers using bit-wise operator with XOR operator | Understanding of XOR operator

/********* PROGRAM **********/ #include<stdio.h>main(){ int a,b; printf(“Enter a,b values : “); scanf(“%d%d”,&a,&b); printf(“Before swapping a = %d t...

## C Program to print binary equivalent of Integer | Binary equivalent of integer

/********** Program ***********/#include<stdio.h>main(){ int n,i; printf(“Enter any Number : “); scanf(“%d”,&n); for(i=31;i>=0;i–) { printf(“%d”,((n>>i)&1) ? 1 : 0);...