This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.devkitARMrc ] ; then | |
. ~/.devkitARMrc | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Japanese_Variable_Identifier | |
{ | |
public static void main(String[] args) | |
{ | |
String しょうげきのじじつ = "Javaは変数名に日本語が使える!"; | |
System.out.println(しょうげきのじじつ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void hoge(int b[],int c[10],int *d) | |
{ | |
printf("b = 0x%p sizeof(b) = %lu\n",b,sizeof(b)); | |
printf("c = 0x%p sizeof(c) = %lu\n",c,sizeof(c)); | |
printf("d = 0x%p sizeof(d) = %lu\n",d,sizeof(d)); | |
} | |
int main(void) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) | |
{ | |
int hoge=100; | |
long huga=10000000000; /* 100億 */ | |
hoge-=huga; | |
printf("%d\n",hoge); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) | |
{ | |
int hoge=0x00000000ffff00ff; | |
long huga=0xffffffffffffffff; | |
int a=hoge-huga; | |
long b=hoge-huga; | |
printf("a = %016x\n",a); | |
printf("b = %-16lx\n",b); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) | |
{ | |
int hoge=0x00000000ffff00ff; | |
long huga=0x7fffffffffffffff; | |
int a=hoge-huga; | |
long b=hoge-huga; | |
printf("hoge : %016x %d\n",hoge,hoge); | |
printf("huga : %016lx %ld\n",huga,huga); | |
printf(" a : %016x %d\n",a,a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) | |
{ | |
int hoge=0x00000000ffff00ff; | |
long huga=0xffffffffffffffff; | |
int a=hoge-huga; | |
long b=hoge-huga; | |
printf("a = %016x\n",a); | |
printf("b = %-16lx\n",b); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void hoge(int x,int y,int z) | |
{ | |
printf("x = %d\n",x); | |
printf("y = %d\n",y); | |
printf("z = %d\n",z); | |
} | |
int main(void) | |
{ | |
int a=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define count_bits(n) (0x0000ffff&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))>>8)))+((0xffff0000&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count_bits(int n) | |
{ | |
int i; | |
int sum=0; | |
for(i=sizeof(int)*8-1;i>=0;i--) | |
sum+=(n>>i)&1; | |
return sum; | |
} |
OlderNewer