Homework 2: Swapping contents

contents swapping

It is recommended to understand everything in Hello World!, Variables before attempting this homework

Implement your code such that the values of a and b are swapped.

#include <stdio.h>

int main() {
    float a = 4.0f, b= 3.7f, c;
    printf("before swapping, a = %f, b = %f\n", a, b);
  // your code starts here
  
  // your code ends here
    printf("after swapping, a = %f, b = %f\n", a, b);
    return 0;
}

ZINC Submission

Submit your finished code to ZINC

Last updated