Your SlideShare is downloading. ×
0
Headerfiles
Headerfiles
Headerfiles
Headerfiles
Headerfiles
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Headerfiles

388

Published on

EXPLAINS SOME OF THE HEADER FILES AND THE INBUILT FUNCTIONS AVAILABLE WITH THE HEADER FILES

EXPLAINS SOME OF THE HEADER FILES AND THE INBUILT FUNCTIONS AVAILABLE WITH THE HEADER FILES

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
388
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. CHARACTER FUNCTIONS Header file: ctype.h <ul><li>int isalpha (int ch): </li></ul><ul><li>returns non zero if ch is alphabet else returns 0 </li></ul><ul><li>int isalnum (int ch): </li></ul><ul><li>returns non zero if ch is alphabet or digit else returns 0 </li></ul><ul><li>int isdigit (int ch): </li></ul><ul><li>returns non zero if ch is a digit ( 0 – 9) else returns 0 </li></ul><ul><li>int islower (int ch): </li></ul><ul><li>returns non zero id ch is a lower case letter else returns 0. </li></ul>
  • 2. <ul><li>int isupper ( int ch ): returns non zero if ch is in uppercase letter else 0. </li></ul><ul><li>int toupper ( int ch ): returns uppercase equivalent of ch if ch is a letter otherwise ch is returned unchanged. </li></ul><ul><li>int tolower ( int ch): returns lowercase equivalent of ch if ch is a letter else ch is returned unchanged. </li></ul>
  • 3. STRING FUNCTIONS HEADER FILE : string.h <ul><li>int strlen ( str ) returns the length of the string </li></ul><ul><li>int strcmp ( str1, str2 ) &amp; int stricmp (str1, str2) returns 0 id str1 = str2 &gt;0 if str1 &gt; str2 &lt;0 if str1 &lt; str2 Note : stricmp ignores case of the character </li></ul><ul><li>char strcpy ( dstr, sstr) copies contents of sstr to dstr </li></ul><ul><li>int strcat ( str1, str2 ) copies contents of str2 to str1 without overwriting </li></ul>
  • 4. MATHEMATICAL FUNCTIONS header file: math.h <ul><li>fabs (num) returns absolute value of floating point num. e.g. fabs( 1.0 ) : 1.0 fabs ( - 1.0 ) : 1.0 </li></ul><ul><li>fmod ( x, y ) returns remainder of division x/y e.g. fmod(10.0, 4.0 ) : 2.0 </li></ul><ul><li>log10 (num) returns base 10 logarithm for the num e.g. log10( 1.0 ) gives base 10 logarithm for 1.0. </li></ul><ul><li>pow (x, n) returns the power of no. x to the power n.e.g. pow(4.0, 2.0) : 16 </li></ul><ul><li>sqrt (num) returns the square root of a no. e.g. sqrt(18): 9.0 </li></ul>
  • 5. <ul><li>sin (num): returns the sine value of the no. </li></ul><ul><li>cos (num): returns the cosine value of the number </li></ul><ul><li>abs (num): returns the absolute value of an integer. </li></ul>

×