黑猫男友的填满方式9:怎样输出 char a = 'k'; 中a的地址?
来源:百度文库 编辑:高校问答 时间:2024/10/05 11:23:23
#include<iostream.h>
void main()
{
char a = 'k';
cout << &a << endl;
}
//怎么输出的是乱码呢
//输出“ k烫汤?”
//为什么输出乱码时只输出“烫"而不输出别的字符或汉字呢
void main()
{
char a = 'k';
cout << &a << endl;
}
//怎么输出的是乱码呢
//输出“ k烫汤?”
//为什么输出乱码时只输出“烫"而不输出别的字符或汉字呢
#include <iostream.h>
#include <iomanip.h>
int main()
{
char a='k';
cout<<hex<<(int) &a<<endl; // 十六进制显示
cout<<dec<<(int) &a<<endl; // 十进制显示
cout<<oct<<(int) &a<<endl; // 八进制显示
return 0;
}
printf("%d",&a);
怎样输出 char a = 'k'; 中a的地址?
char a[10]="";是什么意思?
c++ 求助,char>="a"错误?
char a[]="xyz",b[]={'x','y','z'};,a和b那个长度更长
编写函数void fun(char *a,char *b)
编写函数void fun(char *a,char *b),
void fun(char *a, char *b)?(C语言)
main() {char ch ='A'; while (ch<='Z') {printf ("%c", ch); ch++;} printf("\n");} 结果是?
main() {char ch ='Z'; while (ch>='A') {printf ("%c", ch); ch--;} printf("\n");} 结果是?
main() {char *s1 = "abcdeg"; char *s2="a"; s1++; s2++; printf ("%d\n",strcmp(s1,s2));}