Sie sind auf Seite 1von 2

10

:
,.
>#include<stdio.h
)(int main
{
;]int cube[2][3][4
;int i=0,j=0,k=0
;int counter=1
{)for(k=0;k<4;k++
{)for(i=0;i<2;i++
{)for(j=0;j<3;j++
;cube[i][j][k]=counter
}
;counter++
}
}
}

,
.???
:

;)]",cube[j][i][k

printf("%d

:
):strncpy(s,t,n
n t .s
' '\0 :
>#include<stdio.h
>#include<string.h
)(int main
{
;"char t[]="Hello
;]char s[10
;)strncpy(s,t,2
;)puts(s
}

He#$%$%^&%$$%^^ :
< ' '\0 s
>#include<stdio.h
>#include<string.h
)(int main
{
;"char t[]="Hello
;]char s[10
;)strncpy(s,t,6
;)puts(s
}

Hello :
83-120 Avshalom Elmalech

:Strcat(s,t)
s s s t
#include<stdio.h>
#include<string.h>
int main()
{
char d[]="Hello ";
char s[]="World";
strcat(d,s);
puts(d);
}

Prints out: "Hello World"


: , char* strcat :"
#include<stdio.h>
#include<string.h>
int main()
{
char d[]="Hello ";
char s[]="World";
char e[30];
strcpy(e,strcat(d,s));
puts(e);
}

Prints out: "Hello World"


:strchr(string,char)
.string char
#include<stdio.h>
#include<string.h>
int main()
{
char d[]="Hello ";
char s[]="Word";
int i=0;
i=strchr(d,'l');
printf("first place in memory: %i\n",d);
printf("the position of our char in memory: %i\n",i);
//printf("%d\n",strchr(d,'l')-d+1); //prints 3
}

Prints out:
first place in memory: 1964328
the position of our char in memory: 1964330
:
.

83-120 Avshalom Elmalech

Das könnte Ihnen auch gefallen