以下为 Windows NT 下的 32位 C++程序,请计算 sizeof的值char str[] = “Hello” ; char *p = str ;int n = 10;请计算 sizeof (str )= sizeof ( p ) = sizeof ( n ) = void Func (char str[100]){请计算 sizeof( str ) = }void *p = malloc( 100 );请计算 sizeof ( p ) =

以下为 Windows NT 下的 32位 C++程序,请计算 sizeof的值

char str[] = “Hello” ; char *p = str ;int n = 10;请计算 sizeof (str )

= sizeof ( p ) = sizeof ( n ) = void Func (

char str[100]){请计算 sizeof( str ) = }

void *p = malloc( 100 );请计算 sizeof ( p ) =


相关考题:

定义字符指针char *str="hello",已知sizeof(str)=4,则strlen(str)=______。

请读程序: includde include void fun(char * s) {char a[10]; str 请读程序: # includde<stdio.h> # include<string.> void fun(char * s) {char a[10]; strcpy(a,"STRING"); s=a; } main() { char*p; fun(p); print{("%s\n",p); } 上面程序的输出结果(表示空格) ( )A.STRINGB.STRINGC.STRINGD.不确定的值

void setmemory(char **p, int num){ *p=(char *) malloc(num);}void test(void){ char *str=NULL;getmemory(str,100);strcpy(str,"hello");printf(str);}运行test函数有什么结果?( )

char str[ ]= "Hello";char *p=str;int n=10;sizeof(str)=( )sizeof(p)=( )sizeof(n)=( )void func(char str[100]){ }sizeof(str)=( )

有关内存的思考题1. void getmemory(char *p){ p=(char*)mallol(100);}void test(void){char * str =null;getmemory(str);strcpy(str,”hello,world”);printf(str);}请问运行 Test 函数会有什么样的结果

Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}voidTest(void){char *str = NULL;GetMemory(str, 100);strcpy(str, "hello"); printf(str); }请问运行Test 函数会有什么样的结果?

下面的程序各自独立,请问执行下面的四个TestMemory 函数各有什么样的结果?①void GetMemory(char * p){p = (char * )malloc(100);}void TestMemory (void){char *str = NULL;GetMemory (str);strcpy(str, "hello world");prinff(str);}② char * GetMemory (void){char p[ ] = "hello world";return p;}void TestMemory (void){char * str = NULL;str = GetMemory( );printf(str);}③void GetMemory(char * * p, int num){* p = (char * )malloc(num);}void TestMemory (void){char * str = NULL;GetMemory(str, 100);strcpy( str, "hello" );printf(sir);}④void TestMemory (void){char *str = (char * )malloe(100);strepy (str, "hello" );free ( str );if(str ! = NULL){strepy( str, "world" );printf(str);}}

以下程序的输出结果是【 】。includeincludechar*fun(char*t){ char *p=t;retur 以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *t){ char *p=t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}

35、以下程序的运行结果是___________。 void print(char *s){ printf("%s", s); } int main(){ char *p, *q; char str[]="Hello, World\n"; q=p=str; p++; printf(q); printf(p); return 0; }A.H eB.Hello, World ello, WorldC.Hello, World Hello, WorldD.ello, World llo, World