LIBRARY FILE AND BUILT-IN-FUNCTION IN C ++ PROGRAMMING

Library files and built-in functions

There are two types of functions used in the 'C' programming language. Function by the first user and second built-in-function like scanf (), etc etc.


Built-in functions in 'C' programming language are available in a fixed file. These are called header files. Before using all these functions, the file related to the function has to be included. We can also use more than one header file in a program. For this, we have to use more than one include statement.


To work in C it is necessary to have the following header files.


  1. ctype.h
  2. math.h
  3. stdio.h
  4. stdlib.h
  5. string.h
  6. time.h

Functions used in ctype.h file in ctype.h file


  1. isalnum (char) - This function is used to check alphanumeric characters. If the argument is alphanumeric, non-zero otherwise returns zero.
  2. in alpha (char) - This function is used to check alphabetic characters. If the argument is alphabetic, non-zero otherwise returns zero.
  3. ASCII (char) - This function is used to check an argument's ASCII character if the argument is an ASCII character, non-zero otherwise returns zero.
  4. Encontre (char) - This function is used to check the ASCII Control character of an argument. If the argument is an ASCII Control character then non zero otherwise returns zero.
  5. isdigit (char) - This function is used to check the value given in an argument by a number. If the argument is a number then non-zero otherwise returns zero.
  6. Islower (char) This function is used to check the case given in the argument. If the argument is a lower case letter then non-zero otherwise returns zero.
  7. isupper (char) - This function is used to check the case given in the argument. If the argument is upper case letter then non zero otherwise returns zero.
  8. is digit (char) - This function is used to check the value given in an argument with an octal digit. If the argument is an octal digit then non zero otherwise returns zero.
  9. six digit (char) - This function is used to check the value given in an argument with a hexadecimal digit. If the argument is a hexadecimal digit then non zero otherwise returns zero.
  10. isprint (char) - This function is used to check the printing of the ASCII value of a given letter in an argument. If the argument can be printed then non zero otherwise returns zero.
  11. inspect (char) - This function is used to check the value given in an argument with the Punctuation letter. If the argument is Punctuation letter then non zero otherwise returns zero.
  12. Espace (char) - This function is used to check the value given in an argument with Space. If the argument is a space letter then non zero otherwise returns zero.
  13. ASCII (char) - This function is used to convert a given value in an argument into an ASCII value.
  14. to lower (char) - This function is used to change the value given in an argument to a lower case.
  15. toupper (char) - This function is used to change the value given in an argument to the upper case.

The function used in the math.h file


  1. acos (double) - This function is used to find the cosine value of a given value in an argument.
  2. Asin (double) - This function is used to find the sine value of a given value in an argument.
  3. atan (double) - This function is used to find the tangent value of a given value in an argument.
  4. Atan2 (double1, double2) - This function is used to find the value double1 / double2 given in an argument.
  5. ceil (double) - This function is used to round the number to the nearest integer.
  6. Cos (double) - This function is used to find the cosine value of a given value in an argument.
  7. cosh (double) - This function is used to find the hyperbolic cosine value of a given value in an argument.
  8. exp (double) - This function is used to find the power P of e.
  9. fabs (double) - This function is used to find the Absolute value of the double value given in the argument.
  10. floor (double) - This function is used to round the number to the next lowest integer.
  11. Fmod (d1, d2) - This function is used to find the remainder of d1 / d2.
  12. Labs (long) - This function is used to find the absolute value of an argument.
  13. log (double) - This function is used to find the logarithm number.
  14. pow (double1, double2) - This function is used to find the power double2 of double1.
  15. sin (double) - This function is used to find the sine value.
  16. sinh (double) - This function is used to find the hyperbolic sine value.
  17. sqrt (double) - This function is used to square a number.
  18. tan (double) - This function is used to find the tangent value of a number.
  19. tanh (double) - This function is used to find the hyperbolic tangent value of a number.

The function used in studio.h file


  1. Close (file_pointer) - This function is used to close a file. If the file is closed correctly it returns zero.
  2. Feof (file_pointer) - This function is used to find the position of a file while reading a file. If file_pointer is at the end of the file then it returns non-zero otherwise zero.
  3. fgetc (file_pointer) - This function is used to read characters from a file.
  4. fgets (string, integer, file_pointer) - This function is used to read strings from a file. This function reads the string from file_pointer and stores it in a string whose maximum number is an integer.
  5. fopen (file_pointer) - This function is used to open files in different modes.
  6. fprintf (file_pointer) - This function is used to write different types of values ​​in a file.
  7. Fputc (char, file_pointer) - This function is used to write different types of values ​​in a file.
  8. Fputs (string, file_pointer) - This function is used to write characters in a file.
  9. Fscan (file_pointer, long, integer) - This function is used by file_pointer to read different types of values.
  10. Fseek (file_pointer, long, integer) - This function is used to change the position of file_pointer from integer to long.
  11. Ftell (file_pointer) - This function is used to check the status of file_pointer. This function returns a value of type long.
  12. Getc (file_pointer) - This function is used to read characters from a file.
  13. Getchar (void) - This function is used to read characters from a standard input device.
  14. Gets (string) - This function is used to read a string from a standard input device.
  15. Printf (….) - This function is used to write a string to a standard input device.
  16. Putc (char, file_pointer) - This function is used to write characters to a file.
  17. Putchar (char) - This function is used to write characters on a standard input device.
  18. Puts (string) - This function is used to write a string with a new line letter on a standard input device.
  19. Rewind (file_pointer) - This function is used to push file_pointer to the first byte of a file.
  20. Scanf (-.) - This function is used by standard input devices to read characters.

Function used in stdio.h file


  1. Abs (integer) - This function is used to find the absolute value of an integer value.
  2. Atoi (string) - This function is used to convert strings into double type numbers. This function returns the value of type integer.
  3. Atof (string) - This function is used to convert string to double type number.
  4. Atol (string) - This function is used to convert a string into a long type of number.
  5. Calloc (u1, u2) - This function is used to create a space of u1 elements in memory which are numbered u2. This function returns the base address of the created space.
  6. Exit (u) - This function is used to finish the implementation of the program. u determines the status of completion.
  7. Free (pointer) - This function is used to clear created memory whose index is pointer.
  8. malloc (integer) - This function is used to create a space for integer bytes.
  9. Rand (void) - This function is used to find random positive integers.
  10. Reallc (pointer, u) - This function is used to shape the memory created.
  11. System (string) - This function is used to pass string to the operating system if the command executes correctly, it returns zero otherwise non zero value.

The function used in the string.h file


  1. strcmp (string1, string2) - This function is used to lexicographically check two strings string1 and string2. If string1 is equal to string2 then it returns zero. If string1 is less than string2, it returns a negative value and if string1 is larger than string2, it returns a positive value.
  2. Strcmpi (string1, string2) - This function is used to test two strings string1 and string2 lsxicographically without taking the case into consideration. If string1 is equal to string2 then it returns null. If string1 is less than string2, it returns a negative value and if string1 is greater than string2 it returns a positive value.
  3. Strcpy (string1, string2) - This function is used to compress string2 into string1.
  4. Strlen (string) - This function is used to find the length of a string.
  5. Strset (string, char) - This function is used to store char in every letter of a string.

The function used in time.h file


  1. Time (variable) - This function is used to store the current time in a long int type of variable.
  2. Diftime (variable, variable) - This function is used to find the difference between two different times. This function returns a value of type long int.
AKASH TIMES

I AM AN ENGINEER BY PROFESSION BUT BLOGGER IS MY OLD DAYS DREAM TO CREATE MY OWN SITE FOR THOSE WHO ARE CURIOUS ABOUT MY BIRTHPLACE THEN I AM COMING FROM (INDIA). THE CURRENT CITY LIVES IN NAVI MUMBAI, INDIA

Post a Comment

IF YOU HAVE ANY PROBLEM PLEASE FELL FREE TO CONTACT US BY - AKASH TIMES

PREVIOUS POST NEXT POST