Header files in c

Welcome to c programming learning



Last post program output is 2

Now we are going to learn about header files.

HEADER FILES


Header files are very important in c programming language because these header files consists of predefined functions like printf(),scanf(),pow()....etc
There we have more header files in that we learn here some which are some what important...


1.stdio.h


In this header file consists of address of Function that is printf() and scanf() functions addresses.
This means standard input and output.

2.conio.h



Next of above header file we use this.
In this we have two main functions definition those are clrscr(), getch(),getche()

3.stdlib.h



 This is standard library header file. In this we have dynamic memory allocation functions definition ,those are malloc,calloc,realloc,free. And also delay(),rand(),abs(),exit() functions definition are there in this library.

4.math.h



This header file consists of all mathematical functions definition, those are floor(),round(),ceil(),sin(),cos(),cosh(),sinh(),pow()....etc.

Note:- In this floor (3.5)= 3
 ceil of 3.5 is 4

5.time.h


In this we use related  to time that is setdate(),getdate(),clock(),time() ...etc

6.signal.h


In this we use signal(),raise()..etc

7.errno.h


In this errno() function definition is there.

8.ctype.h


It consists of isgraph() function definition.
And also ispunct(),isdigit(),isalpha().

9.unistd.h


It consists of sleep() function definition. This function is used to make some delay in the execution.

10. string.h


This is exclusive  for strings ( array of characters) that is strcpy(),strrev(),strcmp(),strcat(),strlwr(),strupr(),..etc.

Like we have limits.h for string...etc



Today's programs ...

Please comment output of this programs...


1.#include<studio.h> void main() {  int a= 2; printf("%d",++a);
} Output :-


2.#include<studio.h>

#include<math.h> void main() {  int a= ceil(4.5); printf("%d",a); } Output:-...







Comments

Popular posts from this blog

strings in c programming

C programming basics