Search
 
SCRIPT & CODE EXAMPLE
 

C

c pass int by reference

void func(int *v){
  (*v)++;
}

int
main () {
    int a = 5;
    func(&a);
    printf("a: %d
", a); // output-> a: 6
    
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: bitwise operators in c 
C :: directory folders structure show windows 10 command prompt 
C :: convert int to string c 
C :: factorial of a number in c 
C :: read a document from console in c 
C :: extract substring after certain character in flutter 
C :: make a function makefile 
C :: count distinct characters in a string C 
C :: binary to decimal in c 
C :: vowel and consonant C 
C :: check if string is the same c 
C :: How to Convert double to int in C 
C :: Passing a matrix in a function C 
C :: delete string function in c 
C :: pointer to function c 
C :: how to get the lowest number on a array in c 
C :: c concatenate and allocate string 
C :: c print 2d array 
C :: imprimir matriz 
C :: declaration in c 
C :: fread 
C :: c read binary file 
C :: armstrong in c 
C :: loops questions on c 
C :: what is O(N^2) in bubble sort method 
C :: Number 10 
C :: how to change the smartart style to 3D polished in powerpoint 
C :: permutation and combination program in c 
C :: pointer operator 
C :: sum of fibonacci series in c 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =