Consider the following code :
#include<stdio.h>
void f1(char *x, char *y) {
char *t;
t = x;
x = y;
y = t;
}
void f2(char **x, char **y) {
char *t;
t = *x;
*x = *y;
*y = t;
}
int main()
{
char *a = "ONE", *b = "TWO";
f1(a, b);
printf("%s %s", a, b);
f2(&a, &b);
printf("%s %s", a, b);
return 0;
}
What will be the output of the above code?
Aspire Study Online Test Series,
Information About Examination,
Syllabus, Notification
and More.