Problem Description
Write a C program to swap elements in cyclic order using call by reference.Test Case 1
Input (stdin)1 2 3
Expected Output3 1 2
Test Case 2
Input (stdin)2 5 6
Expected Output6 2 5
Program
#include <stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d",c); printf("\n%d",a); printf("\n%d",b); return 0; }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.