What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-11-06 14:51:12
how to find absolute value in c++
#include <iostream> #include <cstdlib> using namespace std; int main() { int x = -5; long y = -2371041; int a = abs(x); long b = abs(y); cout << "abs(" << x << ") = |" << x << "| =... Add solution -
C++ 2021-11-02 15:40:06
function call in c++
#include <iostream> using namespace std; //REMOVE COMMENTS TO USE VARIOUS FUNCTION CALLING METHODS // function declaration void swaper(int &,int&) ;// call by reference //void swaper(int *,int * );// call by address //void swaper(int,int );... Add solution -
C++ 2021-10-30 05:34:10
pointers to pointers in cpp
#include <iostream> using std::cout; int main() { /* Some things to keep in mind: -you shouldn't circumvent the type system if you are creating raw ptrs and don't need to "type pun" or cast (don't use void ptrs) -ptr types ... Add solution -
Java 2021-10-30 03:37:08
System arraycopy() method in java
public class ArrayCopyDemo { public static void main(String[] args) { int[] arrOne = {2,4,6,8,10,12,14,16,18,20}; int[] arrTwo = {1,3,5,7,9,11,13,15,17,19}; int[] sourceArr, sourcePosition, destinationArr[], destinationPosition, le... Add solution -
C++ 2021-10-29 23:24:09
return multiple objects from a function C++ using references
#include <iostream> using namespace std; void div(int a, int b, int &quotient, int &remainder) { quotient = a / b; remainder = a % b; } main() { int a = 76, b = 10; int q, r; d... Add solution -
Java 2021-10-29 09:19:11
casting in java
Primitive Type casting and Reference Type casting PRIMITIVE CASTING: implicit casting (casting smaller type to larger int a = 100; double c = a;) explicit casting (casting larger to smaller byte b = (byte) a; REFERENCE CASTING: upcasting - implicitl... Add solution -
Java 2021-10-29 08:51:05
java program to find transpose of a matrix
import java.util.Scanner; public class MatrixTransposeInJava { public static void main(String[] args) { int[][] arrGiven = {{2,4,6},{8,1,3},{5,7,9}}; // another matrix to store transpose of matrix int[][] arrTranspose = new ... Add solution
Best helpers
Ranking is empty