Pointers in C

Sort by

recency

|

691 Discussions

|

  • + 0 comments
    *a = *a + *b; *b = (*a-*b)-*b; *b = (*b<0)?-(*b):*b;
    
  • + 0 comments

    int sum , diff; sum = *a +*b; diff = (*a > *b) ? (*a - *b) : (*b - *a); *a = sum; *b = diff;

  • + 0 comments

    This solution demonstrates the basic usage of pointers in C. Mahadev betting

  • + 0 comments

    Here is HackerRank Pointers in C problem solution

  • + 0 comments
    void update(int *a,int *b) {
        int x, y; 
        x = *a + *b;
        y = abs(*a - *b);  // use <stdlib.h>
        *a = x;
        *b = y;      
    }