What do you want to save?
Add Code snippet
New code examples
-
C 2022-02-16 02:40:16
passing a pointer to a function
// passing a pointer to function in C // It increaments the salary of an employee #include <stdio.h> void salaryhike(int *var, int b) { *var = *var+b; } int main() { int salary=0, bonus=0; printf("Enter the employee current salar... Add solution -
C++ 2022-02-16 02:30:33
void *malloc( size_t size ) { //do your stuf here return ::malloc(size); }
/* malloc example: random string generator*/ #include <stdio.h> /* printf, scanf, NULL */ #include <stdlib.h> /* malloc, free, rand */ int main () { int i,n; char * buffer; printf ("How long do you want the string? "... Add solution -
C 2022-02-14 22:50:07
sum of all column in matrix in c
/* C Program to find Sum of columns in a Matrix */ #include<stdio.h> int main() { int i, j, rows, columns, a[10][10], Sum; printf("Please Enter Number of rows and columns : "); scanf("%d %d", &i, &j... Add solution -
C 2022-02-14 16:40:12
c program to find average of 3 numbers
#include <stdio.h> int main(void) { // these numbers can be whatever you want int number = 1231231; int number2 = 1231232; int number3 = 1; // add up all the numbers you want to average, then divide it by the total amount of numbers. ... Add solution -
C 2022-02-13 21:20:06
floyd warshall algorithm c program
#include<stdio.h>#include<conio.h>int min(int,int);void floyds(int p[10][10],int n) { int i,j,k; for (k=1;k<=n;k++) for (i=1;i<=n;i++) for (j=1;j<=n;j++) if(i==j) p[i][j]=0; else p[i][j]=min(p[i][j],p[i][k]+p[k][j])... Add solution -
Other 2022-02-12 03:10:07
change node version [https://github.com/nvm-sh/nvm]
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$... Add solution