Programming in C—InBuilt function in "Header Files".

Words
527
Reading
3 min
6y
Listen to this post
~4 min
Hello Everyone

images.jpeg


Image Source

I hope you all are fine and safe inside your homes. This is a weird time ongoing in the whole world and I hope it will get over soon. As during this time, everyone is locked into their homes. I want to share the C programming language with you. I hope you guys like it, so let's happen today's topic.

In-Built Functions for different header files

List of functions in Math.h file:
Math.h header file supports all mathematical functions. All functions used for Math.h header file are here:

FunctionDescription
floor()It returns nearest integer which is less than or equal to argument passed.
round()It returns nearest integer value to float/double/long function.
ceil ( )This function returns nearest integer value which is greater than or equal to the argument passed to this function.
sin ( )This function is used to calculate sine value.
cos ( )This function is used to calculate cosine.
cosh ( )This function is used to calculate hyperbolic cosine.
exp ( )This function is used to calculate the exponential “e” to the xth power.
tan ( )This function is used to calculate tangent.
tanh ( )This function is used to calculate hyperbolic tangent.
sinh ( )This function is used to calculate hyperbolic sine.
log ( )This function is used to calculates natural logarithm.
log10 ( )This function is used to calculates base 10 logarithm.
sqrt ( )This function is used to find square root of the argument passed to this function.
pow ( )This is used to find the power of the given number.
trunc.(.)This function truncates the decimal value from floating point value and returns integer value.

List of functions in String.h file:
String.h header file contains inbuilt functions mentioned below:

String FunctionDescription
strcat ( )Concatenates string2 at the end of string1
strncat ( )Appends a portion of string to another
strcpy ( )Copies string2 into string1
strncpy ( )Copies given number of characters of one string to another
strlen ( )It gives the length of string1
strcmp ( )Returns 0 if string1 is same as string2.
strchr ( )Returns pointer to first occurrence of char in string1
strrchr ( )It shows last occurrence of given character in a string
strstr ( )It returns pointer to first occurrence of string2 in string1
strrstr ( )It returns pointer to last occurrence of string2 in string1
strdup ( )It duplicates the string
strlwr ( )It converts string to lowercase
strupr ( )It converts string to uppercase
strrev ( )It reverses the given string
strset ( )Sets all character in a string to given character
strnset ( )It sets the portion of characters in a string to given character
strtok ( )It Tokenizes given string using delimiter
memset()It is used to initialize a specified number of bytes to null or any other value in the buffer
memcpy()It is used to copy a specified number of bytes from one memory to another
memmove()It is used to copy a specified number of bytes from one memory to another or to overlap on same memory.
memcmp()It is used to compare specified number of characters from two buffers
memicmp()It is used to compare specified number of characters from two buffers regardless of the case of the characters
memchr()It is used to locate the first occurrence of the character in the specified string

Logo.png



Gif by @doze

Logo.png

Thank you.

I hope you guys liked my post.

Keep Supporting.

STAY TUNED FOR NEXT POST

UPVOTECOMMENTRESTEEM
IF YOULIKEDMY POST

Logo.png

Created by @zord189

Stay Home, Stay Safe

peerzadazeeshan@peerzadazeeshan

PEACE✌️✌️

Programming in C—InBuilt function in "Header Files". | Ecency