What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-17 07:10:05
what is composition in python
# It's when a class has a (is made-of) another class. # Example class Thing(object): def func(self): print("Function ran from class Thing().") class OtherThing(object): # Note that I don't use inheritance to get the func() fun... Add solution -
Other 2022-03-10 15:45:03
function composition python
# It's when a class has a (is made-of) another class. # Example class Thing(object): def func(self): print("Function ran from class Thing().") class OtherThing(object): # Note that I don't use inheritance to get the func() fun... Add solution -
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-01-30 15:10:39
power function in c without pow
// power function in c without pow #include <stdio.h> double mypow(double base, double power); int main() { int base, exponent; printf("Enter Base: "); scanf("%d", &base); printf("Enter Exponent: "); scan... Add solution -
C 2021-11-15 14:10:14
pass the pointer in C
// 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 2021-11-07 16:02:09
strcpy c implementation
#include <stdio.h> // Function to implement strcpy() function char* strcpy(char* destination, const char* source) { // return if no memory is allocated to the destination if (destination == NULL... Add solution
Best helpers
Cob
+5
V0ight
+5
Jun Czyrka
+5
AppleFix88
+5
Kapil
+5
Oddthinking
+5
Arttu
+5
Geoffre14
+5
Lvoyster
+5
BuckNaked69
+5
S9527
+5