C++ 基础面试题-1

请说出下面代码在32位系统下的输出内容

/*
** 2018/03/21 21:43:00
** Brief:
** Author:ZhangJianWei
** Email:[email protected]
*/
#include <iostream>
using namespace std;
void funa(char* str)
{
	printf("%d", sizeof(str));
	
	cout << endl;

	printf("%d", strlen(str));
}

int main(void)
{
	char a[] = "123456789";
	printf("%d", sizeof(a));
	cout << endl;

	funa(a);

	cout << endl;
	system("pause");
	return 0;
}


反正我是打错了,正确答案 10 4 9





猜你喜欢

转载自blog.csdn.net/z609932088/article/details/79646594