Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

algorithm/convert/convert.c #2

Open
ghost opened this issue Sep 23, 2019 · 3 comments
Open

algorithm/convert/convert.c #2

ghost opened this issue Sep 23, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 23, 2019

#include<stdio.h>
int main() {
char a = 'A';

char b = 'B';
char temp;

temp = a;
a = b;
b = temp;


printf("value of a=%c  \nvalue of b=%c  \nvalue of temp=%c",a,b,temp);
return 0;//原文中temp与tmp混乱,且缺少头文件,缺少尾部花括号

}

@leleliu008
Copy link
Owner

@3047927842 这是用gdb调试的,并不是用printf打印的。你需要在不同的电脑上去观察,比如在GNU/Linux 64bit 32bit的电脑上去分别看看他们的地址范围,这对于了解编译器和不同的平台上的实现才有帮助。仅仅靠打印是看不出什么来的,而且这也太简单了,没啥意义。

@ghost
Copy link
Author

ghost commented Sep 23, 2019

多谢,我是来完成任务的,要发一个issue

@ghost
Copy link
Author

ghost commented Sep 23, 2019

哈哈哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant