#include <stdio.h>
int main( ){
//
int n; char c='?';
printf("n="); scanf("%d", &n);
printf("c="); scanf(" %c", &c);
printf("%d, %c, %d\n", n, c, c);
/*-----------------------------------------
//
char s[8]; int n=0; double y=0;
printf("s, n, y : ");
//scanf("%s %d %lf", s, &n, &y);
scanf("%s,%d,%lf", s, &n, &y);
//scanf("%s %d;%lf", s, &n, &y);
printf("%s, %d, %f\n", s, n, y);
//
char s[8]; int n=0; double y=0;
printf("s = "); scanf("%s", s);
printf("n = "); scanf("%d", &n);
printf("y = "); scanf("%lf", &y);
printf("%s, %d, %f\n", s, n, y);
//
int m[10];
printf("%d, %d\n", &m[0], &m[1]);
printf("%d, %d\n", m, m+1);
printf("%d\n", &m[1]-&m[0]);
printf("%d\n", (m+1)-m);
//
char s[10];
int m[10];
double x[10];
printf("%d, %d, %d\n",
sizeof(s), &s[0], &s[1]);
printf("%d, %d, %d\n",
sizeof(m), &m[0], &m[1]);
printf("%d, %d, %d\n",
sizeof(x), &x[0], &x[1]);
//
printf("%d\n", sizeof(char));
printf("%d\n", sizeof(int));
printf("%d\n", sizeof(double));
//
char c=50;
int n=c*c;
double y=3.1416*n;
printf("%c\n", c);
printf("%6d\n", n);
printf("%e\n", y);
//
//char s[8]="HELLO";
char s[8]={66, 89, 69, 0};//{'O', 'K', '?', '\0'};
//s[0] = 'Z'; s[1] = s[2]+2; s[3] = 32; s[4] = 57;
//s[2] = 0;
puts(s);
-----------------------------------------*/
fflush(stdin);getchar( ); return 0;
}
※コメント投稿者のブログIDはブログ作成者のみに通知されます