Responsive Ads Here

Wednesday, December 11, 2013

C প্রোগ্রামিং চার অধ্যায় -Library Function - PART :1

Library Function: Library function হল সি ল্যাঙ্গুয়েজ এ দেয়া default function’s. সকল ফাংশন এর corresponding header file আছে। যেমন আমরা যখন  printf(), scanf() function ব্যবহার করেছি, তখন আমাদের “stdio.h” header file declare করতে হয়েছে। যেকোন default function প্রোগ্রাম এ ব্যবহার করা হলে তার header file অবশ্যই প্রথমে declare করা লাগবে।



কিছু গুরুত্বপূর্ন লাইব্রেরী ফাংশন।

Function nameHeader fileWork
scanf(…)stdio.hInput নেয়া
printf(…)stdio.hOutput দেয়া
abs(i)stdlib.hReturn the absolute value of i
acos(d)math.hReturn cos-1(d) (মান radian এ return করে, not degree)
asin(d)math.hReturn sin-1(d)
atan(d)math.hReturn tan-1(d)
Sin(i)math.hReturn sin(d) (d এর মান radian এ, degree এর জন্য function টা use করলে degree কে radian এ convert করতে হবে)
cos(i)math.hReturn cos(d)
tan(i)math.hReturn tan(d)
floor(d)math.hReturn only the integer part of a fractional number.
ceil(d)math.hReturn the integer_part+1 of a fractional number
getchar()stdio.hTake a single character input
isalnum(c)ctype.hReturn true if character c is either A-Z,a-z,0-9
isalpha(c)ctype.hReturn true if character c is either A-Z,a-z
isdigit(c)ctype.hReturn true if character c is either 0-9
isupper(c)ctype.hReturn true if character c is either A-Z
islower(c)ctype.hReturn true if character c is either a-z
log(c)math.hReturn ln(c)
log10(c)math.hReturn log(c)
pow(base,p)math.hReturn basep
sqrt(d)math.hReturn 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.hReturn the length of a character array
strcpy(name1,name2)string.hCopy name2 to name1
strcmp(name1,name2)string.hReturn true if name1 and name2 are exactly same
gets(name)stdio.hTake charater array or string as input


C Programming এ আরও অনেক গুলো Library Function রয়েছে। এগুলো সাধারনত সবচেয়ে বেশি ব্যবহৃত Function. নিচে আরও কিছু সবচেয়ে বেশী ব্যবহৃত Library Function এর চার্ট দেওয়া হলো।







No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...