tubeshowcase●1,661,454 videos♡ My collection 0
← Learn to Code

Learn to Code03:53

C swap values of two variables 🥤

Bro Code ↗

From the creator

C swap values of two variables tutorial example explained #C #swap #variables int main() { //------- Example 1 ------- //char x = 'X'; //char y = 'Y'; //char temp; //temp = x; //x = y; //y = temp; //printf("x = %c\n", x); //printf("y = %c\n", y); //------- Example 2 ------- char x[15] = "water"; char y[15] = "soda"; char temp[15]; strcpy(temp, x); strcpy(x, y); strcpy(y, temp); printf("x = %s\n", x); printf("y = %s\n", y); return 0; }

Published 2021-10-06 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code