logo

Crowdly

Browser

Додати до Chrome

Consider the following C program: #include <stdio.h> void fun1(char *s1, char...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Consider the following C program:

#include <stdio.h>

void fun1(char *s1, char *s2) {

char *temp;

temp = s1;

s1 = s2;

s2 = temp;

}

void fun2(char **s1, char **s2) {

char *temp;

temp = *s1;

*s1 = *s2;

*s2 = temp;

}

int main() {

char *str1 = "Hi", *str2 = "Bye";

fun1(str1, str2);

printf("%s %s", str1, str2);

fun2(&str1, &str2);

printf("%s %s", str1, str2);

return 0;

}

The output of the program above is:

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на lms.aub.edu.lb?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome