{{ message }}

Instantly share code, notes, and snippets.

Created Aug 11, 2017
Binary to Decimal C Program
View binary_to_decimal.c
 #include /* * Function to convert a given binary number to * its decimal equivalent. */ int binary_to_decimal(int num) { int rem, base = 1, decimal_number = 0; while( num > 0) { rem = num % 10;
Created Sep 11, 2017
Breadth First Search(BFS) Program in C.
View bfs.c
 #include int a[20][20], q[20], visited[20], n, i, j, f = 0, r = -1; void bfs(int v) { for(i = 1; i <= n; i++) if(a[v][i] && !visited[i]) q[++r] = i; if(f <= r) { visited[q[f]] = 1; bfs(q[f++]);
Created Dec 26, 2019
 Verifying my Blockstack ID is secured with the address 1Gp1jqEktVpJzKbckjLgSZbyuzw4XCrm5 https://explorer.blockstack.org/address/1Gp1jqEktVpJzKbckjLgSZbyuzw4XCrm5
Last active Oct 17, 2019
C Program to find Binomial coefficients without using recursion
View BinomialCoefficients.c
 // C program to find the Binomial coefficient. Downloaded from www.c-program-example.com #include void main() { int i, j, n, k, min, c[20][20]={0}; printf("This program is brought to you by www.c-program-example.com\n" ); printf("\n Enter the value of n: "); scanf("%d", &n); printf("\n Enter the value of k: "); scanf("%d", &k);
Last active Dec 12, 2018
C Program to check if a given matrix is a magic square matrix or not.
View magic_square.c
 #include void main() { int A[50][50]; int i, j, M, N; int size; int rowsum, columnsum, diagonalsum; int magic = 0; printf("Enter the order of the matrix:\n"); scanf("%d %d", &M, &N);
Created Oct 2, 2018
View keybase.md

### Keybase proof

I hereby claim:

• I am snadahalli on github.
• I am snadahalli (https://keybase.io/snadahalli) on keybase.
• I have a public key ASC9T8GbT8mh26-3Ueg0xikukd4b6iI8GhO8gFlH7AB8Two

To claim this, I am signing this object:

Last active May 16, 2018
C program to sort an integer array using bubble sort.
View bubble_sort.c
 /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and learning purposes. For permissions to use * the programs for commercial purposes, * contact info@c-program-example.com * To find more C programs, do visit www.c-program-example.com * and browse! * Happy Coding ***********************************************************/
Last active Mar 1, 2018
C program to implement a simple calculator using switch statement.
View calculator.c
 /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and learning purposes. For permissions to use * the programs for commercial purposes, * contact info@c-program-example.com * To find more C programs, do visit www.c-program-example.com * and browse! * * Happy Coding ***********************************************************/
Created Oct 23, 2013
C program to check whether a given character is vowel or consonant.
View vowel.c
 /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and learning purposes. For permissions to use the * programs for commercial purposes, * contact info@c-program-example.com * To find more C programs, do visit www.c-program-example.com * and browse! * * Happy Coding ***********************************************************/
Last active Nov 4, 2017
C Program to convert number to words
View number_to_words.c
 #include #include void main() { long num, div, n1; int flag, digit, pos, tot_dig; printf("\nEnter a number: "); scanf("%ld", &num); if(num == 0) {