villiboy
Mitglied
hallo leute,
ich beschäftige mich gerade mit typen und wann eine typumwandlung stattfindet. kennt sich da wer aus? komme mit folgendem nicht wirklich zurecht!! danke schon mal...
char ch; int i; float f; double d; char *cp; int *ip; float *fp; double *dp;
f = f + i + ch // resultierender Typ=float und Typumwandlung bei Zuweisung=nein
d=ch+0.5f+f // resultTyp=double und Typ/Zu=nein
fp=0 // resultTyp= float * und Typ/Zu=nein
ip=(int *) 0 //resultTyp=int und Typ/Zu=ja
dp= &dp +7 //resultTyp=double und Typ/Zu=ja
cp=&ch +'1' //resultTyp=char und Typ/Zu=ja
sind meine vermutungen richtig? wäre echt klasse, wenn mir da jemand helfen könnte!! danke
ich beschäftige mich gerade mit typen und wann eine typumwandlung stattfindet. kennt sich da wer aus? komme mit folgendem nicht wirklich zurecht!! danke schon mal...
char ch; int i; float f; double d; char *cp; int *ip; float *fp; double *dp;
f = f + i + ch // resultierender Typ=float und Typumwandlung bei Zuweisung=nein
d=ch+0.5f+f // resultTyp=double und Typ/Zu=nein
fp=0 // resultTyp= float * und Typ/Zu=nein
ip=(int *) 0 //resultTyp=int und Typ/Zu=ja
dp= &dp +7 //resultTyp=double und Typ/Zu=ja
cp=&ch +'1' //resultTyp=char und Typ/Zu=ja
sind meine vermutungen richtig? wäre echt klasse, wenn mir da jemand helfen könnte!! danke