1331com银河游戏

c

c

ƽ̨ûĻоѡcصģ1cַַָ 2һc 3һЩCְ2 4 cc++ʲô 6йCԵ⣬ûκܷһַ 7һcԱ 8cԵһ 9c 10CԱ!!100!
c
ƽ̨û 2018-06-06 16:46:20

Ǿѡƽ̨ûʱ

pi408637535
pi408637535


pi408637535cַַָ

void main(void)
{
char a ;
char *str = &a;
strcpy(str, hello);
printf(str);
} //Ǵģ˵ΪʲôǴ
Ľѱ9648˵

strǸַָ룬ҲԱʾΪַַstr = &a;ʾstrָĵطֻܴһַ

strcpy(str, hello);

϶ŲhelloԻڴ


㲻ţhelloɿմ""ԣΪմռ1ֽڣstrָĵطܷ¡


֪࣬ôγ

#include 
#include 
void main(void) {
    int a;
    char *str = (char *) &a;
    strcpy(str, "abc");
    printf(str);
}

֮Ϊintռ4ֽڣ"abc"Ҳռ4ܷ£""ͲС



һα༭ʱ Ƽ2016-01-20 23:35:11
optimus265
optimus265


optimus265һc

void foo(void)
{
unsigned int a = 6;
int b = -20;
(a+b > 6) puts("> 6") : puts("<= 6");
}

ʴΪʲô >6?

˵ϸص
лл
Ľѱ4112˵
ǿתa+b  һunsigned int ͣusigned int  ķΧ 0~4294967295ڸݲһλټȥ142^32-14,Ի6Ҫ
һα༭ʱ 2014-06-27
tmpiero
tmpiero


tmpieroһЩCְ2

19һ˳1234˳ a4321 b1234 c1432 d3241 20ջ˳Ϊ1234ٶջͳջԴУܵijջ˳ Ϊ a2413 b3142 c3412 d1234 21㷨Ŀռ临Ӷָ a㷨... 19һ˳1234˳
a4321 b1234 c1432 d3241
20ջ˳Ϊ1234ٶջͳջԴУܵijջ˳
Ϊ
a2413 b3142 c3412 d1234
21㷨Ŀռ临Ӷָ
a㷨ij
b㷨ָ
c㷨ռĴ洢ռ
d㷨ִйĴ洢ռ
22ij1000ͬĵԪе͵УҪԸжַ
£ҪٸԪ
a1000 b10 c100 d500
23֪AУÿԪA[I][J]ڴ洢ʱҪռ3ֽڣI0䵽4J0
9ڴӵַSAʼд洢ġʣA[4][7]ʼַΪ
aSA+84 bSA+99
cSA+120 dSA+141
24ʹ˫ݵŵ
a߼ٶ bIJɾ
cԼ洢ռ dܿմ洢ռ
25ijõIJһ֮һ㲢ɾһ
㣬____洢ʽʡʱ
a b˫
cͷڵ˫ѭ

26£ɢбвԪȽϴΪ
an b0 cn/2 d1
27Ethernet·Э
28ͨ·
a·ʹ

c

29̫MTUֵΪ
a500 b1492 c1500 d1982
30һWindows SDK ĻӦóУϢѭ
while(GetMessage(&Msg,NULL,0,0) {
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
ĸϢʹøϢѭ˳УӶֹӦó
aWM_DESTROY bWM_QUIT
cWM_CLOSR dWM_CREATE
31̺߳Ҫ
aCPUȷʽͬ bȼͬ
cڲͬ dжĵַռ䣬ַ̹߳ռ
32ʺڽ̼ͨѶ
asocket bPipe
cڴ dȫֱ
ֻ5֡
Ľѱ8775˵
19. b
20. d
21. d
22. b
23. d
24. b
25. c
26. b
27. ȷ
28. b
29. c
30. b(ɵ)
31. d
32. d

PS.ֶٲҪҪ
һα༭ʱ Ƽ2017-10-01 08:43:58
ϣ20121
ϣ20121


ϣ20121 cc++ʲô

Ľѱ4976˵
ǰûĸģ
ǰֻ֧/**/עֵ֧ͣע//
ǰԺΪλȫΪλ
ǰߺֵֻܴҲֵƴݣõĸԴ
ǰ߲֧쳣try-catch-finally֧
Ļкܶ࣬Ͳһһо
һα༭ʱ Ƽ2016-03-16 03:03:22
2te
2te


2teйCԵ⣬ûκܷһַ

Ľѱ3950˵
ķֵķָ룬ǾͿԷصַǷв޹
һα༭ʱ 2018-02-10
cn131nc
cn131nc


cn131ncһcԱ

ֻ9⼴ 3ÿС3֣12֣ ˵ һԻسַ80ַɾеӢĸַַжַǷԳƣִСд ʾ1 Enter a string:Madam I'm Adam Yes ... ֻ9⼴
3ÿС3֣12֣
˵
һԻسַ80ַɾеӢĸַַжַǷԳƣִСд
ʾ1
Enter a string:Madam I'm Adam
Yes
ʾ2
Enter a string:elephant
No

#include
(9)
main()
{ int flag,i,k,length;
char str[80];
printf("Enter a string:");
gets(str);
i=k=0;
while(str[i])
{
if(isupper(str[i]))str[i]=tolower(str[i]);
if(isdigit(str[i])||isalpha(str[i]) )
{(10)
k++;
}
i++;
}
(11)
length=k;
flag=1;
for(k=0;k<=length/2;k++)
if(str[k]!=str[length-k-1])
{
(12)
break;
}
if(flag)printf("yes\n");
else printf("no\n");
}
ѡĴ𰸡
9Actype.h Bstring.h 𰸣A
Cstdio.h Dmath.h
10Ai++; Bstr[k]=str[i];
Cstr[i]=str[k]; D; 𰸣B
11Astr[i]=\0; Bstr[i-1]=\0;
Cstr[k]=\0; D; 𰸣C
12Aflag=1; Bflag=0;
C; Dcontinue; 𰸣B
Ľѱ6963˵
⣬Ҫ֪A,B,C,DĸⶼЩͷļжͺͺꡣcԵĻÿһҪõͷļ
жһЩѧͺ꣬ʵֲͬѧ㡣Ȼò
ͷļжһЩַԽǷΪ顣Ҳųһ麯strͷҪַIJڶ麯memͷַķʽ
ͷļжһЩַĺЩУÿIJintÿֵΪEOFΪchar͵ַжı׼б£

int isalnum(int c) ַǷĸ

int isalpha(int c) ַǷĸ

int isascii(int c) ַǷASCII

int iscntrl(int c) ַǷǿַ

int isdigit(int c) ַǷַ

int isgraph(int c) ַǷǿɴӡַ

int islower(int c) ַǷСдĸ

int isprint(int c) ַǷǿɴӡַ

int ispunct(int c) ַǷDZַ

int isspace(int c) ַǷǿո

int isupper(int c) ַǷǴдĸ

int isxdigit(int c) ַǷʮַ

int toupper(int c) СдĸתΪдĸ

int tolower(int c) дĸתΪСдĸ
һα༭ʱ Ƽ2016-04-07 10:29:33
zhangrongxia21
zhangrongxia21


zhangrongxia21cԵһ

int main() { int x=3; printf("%d",x); return 1; } ʺȻᱻãΪʲôҪ1
Ľѱ4654˵
1mainķֵΪintͣӦҪӦ͵ķֵ
2ȻDzómainʵmainķֵǿԱϵͳģϵͳпԸmainķֵжϳִ
һα༭ʱ 2011-08-02
մ
մ


մˣc

#include
int my(const int a)
{
static int count=a;
return count+a;
}
int main()
{
printf("%d\n%d\n",my(4),my(5));
return 0;
}

Ϊʲô
9
10
Ľѱ5547˵
ʵIJá
printfmy(4)my(5)ִ˳Dzȷģͱйء˼Ӧmy(5)ִУcountʼΪa5returncount+a10ִmy(4)ʱcountȻ5return9
һα༭ʱ 2013-02-16
comet401
comet401


comet401CԱ!!100!

1. ˵˵IJ֮ͬ char *a = "abc"; char b[] = "abc"; char c[3] = "abc"; aһַָΪַabc׵ַַabcڳ b[ ]ռ4ֽڣb[0]=a ,b[1]= b,b[2]= c,[3]=\0 c[3]ռ3... 1. ˵˵IJ֮ͬ

char *a = "abc";
char b[] = "abc";
char c[3] = "abc";
aһַָΪַabc׵ַַabcڳ
b[ ]ռ4ֽڣb[0]=a ,b[1]= b,b[2]= c,[3]=\0
c[3]ռ3ֽڣc[0]=a ,c[1]= b,c[2]= c

2ΪWindows NTµ32λC
磺int i long int j char k; sizeof(i) = 4; sizeof(j) = 8; sizeof(k) = 1;
32λϵͳ£ռֽ4ռֽ8ַռֽ1

(1)
typedef struct
{
int iPara1;
union
{
char iPara2[5];
int iPara3;
char iPara4;
} Params;
char cPara5;
char cPara6[12];
} TEST_INFO_T;

TEST_INFO_T stTestInfo;


sizeof (stTestInfo ) = 28

(2)
void Func ( char str[3])

sizeof( str ) =4

(3)
void *p = malloc( strlen(hello world) );

sizeof ( p ) =4
(4)
char str[] = Hello ;
char *p = str ;
int n = 10;


sizeof (str ) =6
sizeof ( p ) =4
sizeof ( n ) =4

3 д˳նĽʲô

char acFileName_p[2][50]; /*ȫֱڼЧ*/

int FileExists(char* name)
{
int i;

for(i = 0; i < 2; i++)
{
if( strcmp (( char*) name, char*acFileName_p [i] ) = = 0)
{
return 1;
}
}
return 0;
}
void CheckFileName(char *name)
{
static char suffix[3] = "_1";
if( FileExists(name) )
{
if(suffix[1] != '1')
{
name[strlen(name) - 2] = '\0';
}
strcat(name, suffix);
suffix[1]++;
CheckFileName(name);
}
else
{
suffix[1] = '1';
}
}
main
{
char cString1[50];
char cString2[50];

strcpy(acFileName_p[0], "test1");
strcpy(cString1, "test1");
strcpy(cString2, "test2");

CheckFileName(cString1);
printf("Output1 = %s\n", cString1);

CheckFileName(cString2);
printf("Output1 = %s\n", cString2);

strcpy(acFileName_p[1], cString1);
CheckFileName(cString1);
printf("Output1 = %s\n", cString1);
}


4ҳед

˵´ǰһַ硰Ϊdcba

(1)#include"string.h"
(2)main()
(3){
(4) char*src="hello,world";
(5) char* dest=NULL;
(6) int len=strlen(src);
(7) dest=(char*)malloc(len);
(8) char* d=dest;
(9) char* s=src[len];
(10) while(len--!=0)
(11) d++=s--;
(12) printf("%s",dest);
(13) return 0;
(14)}
Ľѱ6137˵
һ
char *a="abc"; ǰַabc׵ֵַָa
char b[]="abc"; һַ飬Ϊַ abcһ\0 鳤Ϊ4;
char c[3]="abc" д⣬СΪ3һ\0д飬еıᱨ
ڶ
1 struct ṹڴصǣСгԱڴСĺ͡
union ڴصǣСڳԱռڴڴĴСһ4int 13char ǣ4*4+13*1=29(Լ)
2 3 PS˭Ĵ𰸣ӵذ
3 8 PSҪԻ壬ָĴС޷ų С8
4 68ͬ⣩4

1)
Output1 = test1_1
Output1 = test2
Output1 = test1_1_1
2(1)ͷļûб׼ #include
(9)ֵΪָ룬ֵΪԪأֵܸӦΪchar *s=&src[len]
(11)Ӧָ֮ĸֵӦݸֵԸΪ *d++=*s--;
(12)%sַĻdestַָβûС\0'βܳķ(12)ǰһ *d='\0';

вĿ729480205һѧϰ
һα༭ʱ Ƽ2016-12-01 22:18:07
网站地图

银河1331官网