Hello Everyone
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.
Some of the "commands" in C aren't really "commands" in the least but are functions. For example, we've got been using printf and scanf to try to to input and output, and that we have used rand to come up with random numbers - all three are functions.
There are an excellent many standard functions that are included with C compilers and while these aren't really a part of the language, within the sense that you just can re-write them if you really want to, most C programmers think about them as fixtures and fittings. Later in
the course we'll look at the mysteries of how C gains access to those standard functions and the way we will extend the range of the quality library. except for now a listing of the most common libraries and a short description of the foremost useful functions they
contain follows:
1. stdio.h: I/O functions:
- a. getchar() returns the subsequent character typed on the keyboard.
- b. putchar() outputs one character to the screen.
- c. printf() as previously described
- d. scanf() as previously described
2. string.h: String functions
- a. strcat() concatenates a duplicate of str2 to str1
- b. strcmp() compares two strings
- c. strcpy() copys contents of str2 to str1
3. ctype.h: Character functions
- a. isdigit() returns non-0 if arg is digit 0 to 9
- b. isalpha() returns non-0 if arg could be a letter of the alphabet
- c. isalnum() returns non-0 if arg could be a letter or digit
- d. islower() returns non-0 if arg is lowercase letter
- e. isupper() returns non-0 if arg is uppercase letter
4. math.h: Mathematics functions
- a. acos() returns arc cosine of arg
- b. asin() returns arc sine of arg
- c. atan() returns arc tangent of arg
- d. cos() returns cosine of arg
- e. exp() returns natural logarithim e
- f. fabs() returns definite quantity of num
- g. sqrt() returns root of num
5. time.h: Time and Date functions
- a. time() returns current calender time of system
- b. difftime() returns difference in secs between twice
- c. clock() returns number of system clock cycles since program execution
6. stdlib.h:Miscellaneous functions
- a. malloc() provides dynamic memory allocation, covered in future sections
- b. rand() as already described previously
- c. srand() accustomed set the start line for rand()
Thank you.
I hope you guys liked my post.
Keep Supporting.
STAY TUNED FOR NEXT POST
UPVOTE COMMENT RESTEEM
IF YOU LIKED MY POST
Stay Home, Stay Safe
@peerzadazeeshan
PEACE✌️✌️
I hope you guys liked my post.
Keep Supporting.
STAY TUNED FOR NEXT POST
UPVOTE | COMMENT | RESTEEM |
---|---|---|
IF YOU | LIKED | MY POST |