List of all Primes up to a given number Sarfraz Alam November 06, 2018 #include <stdio.h> int *getPrimes(int n) { static int r[10]; int i,j; int count = 0, s=0; for(i = 2 ; i ... Read More
C program to create a moving car Sarfraz Alam September 19, 2018 #include <graphics.h> #include <dos.h> #include <conio.h> main() { int i, j = 0, gd = DETECT, gm; initgrap... Read More
Bankers Algorithm Implementation Sarfraz Alam September 11, 2018 C Program to implement Bankers Algorithm #include<stdio.h> main() { int max[20],all[20],need[20],s... Read More
Draw basic shapes using graphics Sarfraz Alam August 20, 2018 #include<graphics.h> #include<conio.h> main() { int gdd = DETECT,gmm,leftt=100,topp=100,rightt=200,bottomm=200,xx=... Read More
C program to print pascal triangle Sarfraz Alam August 19, 2018 #include<stdio.h> long factorial(int); Pascal Triangle int main() { int i, n, c; printf("How many rows you want ... Read More
C Program To Implement Non Preemptive Scheduling Sarfraz Alam August 09, 2018 "C Program To Implement Non Preemptive Scheduling" #include<stdio.h> int i,j,n; fl... Read More
Shortest job first scheduling algorithm : Implementation in C Sarfraz Alam July 17, 2018 Shortest remaining time First Algorithm In this scheduling algorithm, the process with the smallest amount of time remaining until c... Read More
C program : Add two complex numbers Sarfraz Alam July 09, 2018 #include <stdio.h> struct complex { int real, img; }; int main() { struct complex a, b, c; printf(... Read More
Swap two numbers with pointers in c Sarfraz Alam March 27, 2018 #include <stdio.h> int main() { int x, y, *a, *b, temp; printf("Enter the value of x and y\n"); scanf("%d... Read More
C program to implement clock Sarfraz Alam February 08, 2018 #include<conio.h> #include<graphics.h> #include<math.h> #include<dos.h> #define WBC 5 #define X 200 #define ... Read More
C program to merge two Arrays Sarfraz Alam February 06, 2018 #include<stdio.h> void main() { int arr1[10], arr2[10], res[20]; int i, j, k, n1, n2; printf("\nEnter no of elements in 1... Read More
C project Sarfraz Alam January 30, 2018 C program to create a moving fans with the help of graphics. #define PI 3.14 #include<conio.h> #include<stdio.h> #in... Read More
Addition of two numbers using pointers Sarfraz Alam January 27, 2018 This program performs addition of two numbers using pointers. I have assign the addresses of x and y to p and q respectively and then ass... Read More
C program to swap two numbers using bitwise operators Sarfraz Alam January 25, 2018 #include <stdio.h> int main () { int i = 100 ; int k = 121 ; printf ( " value of i=%d k=%d before swappin... Read More