概述
// Test_C.cpp : Defines the entry point for the console application.
//
#include"stdafx.h"
#include<iostream>
using namespace std;
//strlen()
//sizeof()运算符
short *ar[10][10];
void main()
{
cout<<sizeof(ar)<<endl; //400
}
//void fun(char *str)
/*void fun(char str[])
{
cout<<strlen(str)<<endl;//5
cout<<sizeof(str)<<endl;//4
}
void main()
{ char str[] = "Hello";
cout<<strlen(str)<<endl;//5
cout<<sizeof(str)<<endl;//6
fun(str);//
}*/
/*void main()
{
char *str = "Hello";
cout<<strlen(str)<<endl;//5
cout<<sizeof(str)<<endl;//4
}*/
/*void main()
{
static char str[10];//static变量,属于整个程序
for(int i=0;i<5;++i)
{
str[i] = 'a' + i;//a b c d e
}
cout<<strlen(str)<<endl;//5
cout<<sizeof(str)<<endl;//10
}
char str[10];//全局变量
void main()
{
for(int i=0;i<5;++i)
{
str[i] = 'a' + i;//a b c d e
}
cout<<strlen(str)<<endl;//5
cout<<sizeof(str)<<endl;//10
}
void main()
{
char str[10];//局部变量
for(int i=0;i<5;++i)
{
str[i] = 'a' + i;//a b c d e
}
cout<<strlen(str)<<endl;//?
cout<<sizeof(str)<<endl;//10
}*/
/*void main()
{
int val = "01234567"[3];
/*int val = '