Define a function SwapGrade() that takes two char parameterspassed by pointer and swaps the values in the two parameters. Thefunction does not return any value.
Ex: If the input is A B, then the output is:
B A
#include <stdio.h>
/* Your code goes here */
int main(void) { char grade1; char grade2;
scanf(" %c", &grade1); scanf(" %c", &grade2);
SwapGrade(&grade1, &grade2);
printf("%c %c\n", grade1, grade2); return 0;}
in c please
Define a function SwapGrade() that takes two char parameters passed by pointer and swaps the values in the two parameter
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am