c

Memory class in c language

c

I do not know about memory class of c language ever. recently I have restarted learning c language and to check language format detail. Example, static class.

Today's C

c

I forgot anything about c, because I do not write recently. Today's program is almost copy answer, that problems for c beginner. c is difficult for me. #include <stdio.h> #define NINZU 5 #define KAMOKU 4 int main(void){ int no[NINZU] = {1001,1002,1</stdio.h>…

Today's C

c

#include <stdio.h> #include <ctype.h> int main(void){ int i; for(i=0;i<127;i++){ if(isprint(i)!=0){ if(isalnum(i)){ printf("%c",i); }else{ printf("[%c]",i); } } } return 0; } #include <stdio.h> #include <string.h> int main(void){ char a[21]; char b[11]; int i; do{ printf("aの</string.h></stdio.h></ctype.h></stdio.h>…

Today's C

c

#include <stdio.h> int main(void){ int i; printf("1-3の整数値を入力"); while(scanf("%d",&i) !=EOF){ switch(i){ case 1: printf("apple\n"); break; case 2: printf("banana\n"); break; case 3: printf("cherry\n"); break; default: printf("???\n"); break; </stdio.h>…

Today's C

c

I wrote today, Self learning C. Because I often mistake syntax what scanf needs "&" but forgetting it. compiler display message of warning. I have to careful it. I remember things today what how to give scanf two arguments. It is written l…

Learning c

c

Now learning c, I wrote three programs today. Any program is easy for me because it is for beginner. I am learning to refers "初心者のためのポイント学習C言語", my target is to understand about c and I wanna be engineer looks like graduate…

Character string comparison

c

This program compares character strings. You input two character strings when "Please input two strings". If you do so, It runs and return result what you input value. This program accesses character strings sequentially from first number …

self learn c language

c

Display asterisk from one to nine. Add one thing #include <stdio.h> int main(void){ int n = 0; for(n;n<10;n++){ int i = 0; for(i;i<=n;i++){ printf("*"); } printf("\n"); } return 0; } Addition from one to one hundred. #include <stdio.h> int main(void){ int w</stdio.h></stdio.h>…

Count up and multiplied by 2

c

#include <stdio.h> int main(void){ int i; int data1[10],data2[10]; for(i = 0;i<10;i++){ data1[i] = i; printf("\n"); data2[i] = data1[i] * 2; printf("%d",data2[i]); } return 0; } #include <stdio.h> int main(void){ char a[] = "a[]="; printf("%s",a); int i = 0</stdio.h></stdio.h>…

strcmpについて

c

#include<stdio.h> #include<string.h> int arr[][3] = { {1,1,1}, {2,4,8}, {3,6,9}, {4,16,64}, {5,25,125}, {6,36,216}, {7,49,343}, {8,64,512}, {9,81,729}, {10,100,1000} }; int num; int i; int main(void){ printf("値をいれて"); scanf("%d",&num); for(i=0;i<10;i++)</string.h></stdio.h>…

地味にやってますc

c

独習Cの問題。 1から100まで。 #include <stdio.h> int main(void) { int num; num = 1; for(num;num<101;num++){ printf("%d\n",num); } return 0; } 17で割り切れる数表示 #include <stdio.h> int main(void) { int num; num = 17; for(num;num<101;num++){ if((num % 17) ==</stdio.h></stdio.h>…

入力された数値を2乗して返す

c

独習Cに載ってた問題をやってみた。 #include <stdio.h> int convert(void); int main(void) { int num; num = convert(); printf("%d",num); printf("\n"); return 0; } int convert(void) { int num; printf("2乗する"); scanf("%d",&num); return num * num; } 保</stdio.h>…

cの話し

c

やるといってちゃんとやってなかったc。 今日から再開。とはいえそのうちまたjsとpythonしかやらなくなるだろう。 #include<stdio.h> int main(void) { int num; num = 100; printf("値は%dです\n",num); return 0; } 変数とフォーマット指定子。変数の型を最初に指定</stdio.h>…

連想配列

c

#include <stdio.h> int main(void) { int num[][3] = { {1,1,1},{2,4,8},{3,9,27} }; int suji,i; printf("オッス!3乗値を入力してくれ"); scanf("%d",&suji); for(i = 0;i<3;i++) if(num[i][0] == suji){ printf("3乗根:%d",num[i][0]); printf("根の2乗:%d",num[i</stdio.h>…