Library Function: Library function হল সি ল্যাঙ্গুয়েজ এ দেয়া default function’s. সকল ফাংশন এর corresponding header file আছে। যেমন আমরা যখন printf(), scanf() function ব্যবহার করেছি, তখন আমাদের “stdio.h” header file declare করতে হয়েছে। যেকোন default function প্রোগ্রাম এ ব্যবহার করা হলে তার header file অবশ্যই প্রথমে declare করা লাগবে।
কিছু গুরুত্বপূর্ন লাইব্রেরী ফাংশন।
| Function name | Header file | Work |
| scanf(…) | stdio.h | Input নেয়া |
| printf(…) | stdio.h | Output দেয়া |
| abs(i) | stdlib.h | Return the absolute value of i |
| acos(d) | math.h | Return cos-1(d) (মান radian এ return করে, not degree) |
| asin(d) | math.h | Return sin-1(d) |
| atan(d) | math.h | Return tan-1(d) |
| Sin(i) | math.h | Return sin(d) (d এর মান radian এ, degree এর জন্য function টা use করলে degree কে radian এ convert করতে হবে) |
| cos(i) | math.h | Return cos(d) |
| tan(i) | math.h | Return tan(d) |
| floor(d) | math.h | Return only the integer part of a fractional number. |
| ceil(d) | math.h | Return the integer_part+1 of a fractional number |
| getchar() | stdio.h | Take a single character input |
| isalnum(c) | ctype.h | Return true if character c is either A-Z,a-z,0-9 |
| isalpha(c) | ctype.h | Return true if character c is either A-Z,a-z |
| isdigit(c) | ctype.h | Return true if character c is either 0-9 |
| isupper(c) | ctype.h | Return true if character c is either A-Z |
| islower(c) | ctype.h | Return true if character c is either a-z |
| log(c) | math.h | Return ln(c) |
| log10(c) | math.h | Return log(c) |
| pow(base,p) | math.h | Return basep |
| sqrt(d) | math.h | Return d (square root of d) |
| toupper(c) | ctype.h or stdlib.h | Return capital letter of a letter. |
| tolower(c) | ctype.h or stdlib.h | Return small letter of a letter. |
| strlen(name) | string.h | Return the length of a character array |
| strcpy(name1,name2) | string.h | Copy name2 to name1 |
| strcmp(name1,name2) | string.h | Return true if name1 and name2 are exactly same |
| gets(name) | stdio.h | Take charater array or string as input |
C Programming এ আরও অনেক গুলো Library Function রয়েছে। এগুলো সাধারনত সবচেয়ে বেশি ব্যবহৃত Function. নিচে আরও কিছু সবচেয়ে বেশী ব্যবহৃত Library Function এর চার্ট দেওয়া হলো।



No comments:
Post a Comment