Search
 
SCRIPT & CODE EXAMPLE
 

CPP

pass address to function c++

#include <stdio.h>

void swapnum(int &i, int &j) {
  int temp = i;
  i = j;
  j = temp;
}

int main(void) {
  int a = 10;
  int b = 20;

  swapnum(a, b);
  printf("A is %d and B is %d
", a, b);
  return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: How to write string in lpcstr in c++ 
Cpp :: std 
Cpp :: C++ thread header 
Cpp :: count substrings codechef solution in c++ 
Cpp :: c++ count inversions merge sort 
Cpp :: auto keyword 
Cpp :: 16630147 
Cpp :: C++ Vector Initialization method 02 
Cpp :: vector übergeben c++ 
Cpp :: how to fixed how many digit will be after point in c++ 
Cpp :: choose endianness in cpp 
Cpp :: sort 3 numbers using swap cpp 
Cpp :: infix to prefix using cpp linked list program 
Cpp :: qt/c++ exception handler 
Cpp :: Check if two stacks are the same using C++ 
Cpp :: std::string(size_t , char ) constructor: 
Cpp :: tutti i tipi di equazioni trigonometriche 
Cpp :: round function in c++ 
Cpp :: lower bound c++ 
Cpp :: c++ how to get maximum value 
Cpp :: function prototype c++ 
Cpp :: how to initialize priority queue c++ 
Cpp :: can derived class access private members 
Cpp :: sinonimo de tratar 
C :: generate n-bit gray code in c 
C :: install gitk mac 
C :: random number in c 
C :: data types in c 
C :: fonction recursive successeur nombre chaine de caractere en c 
C :: nested loop in c 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =