Basic concepts of c programming language
WHAT IS C LANGUAGE?
- C program is the set of functions.
- C program is the collection of header files,variable, Data type, operator, etc.
C language is the general purpose Computer programming language developed in 1972 by Dennis Ritchie at the bell Telephone Laboratories use with the unix operating system. Here we are going to discuss about Basic concepts of C programming language.
WHAT IS HEADER FILE?
Header is the collection of multiple functions.For e.g.
stdio.h (standard input output header file)Related function is printf, scanf, gets, puts, etc…
conio.h (Console input output header file)Related function is Clrscr, getch, etc…
Math.h ( maths header file)Related function is sqrt, pow, abs, etc…And many more library…
Basic concepts of of C programming language :
- printf displays information on screen.
- printf returns the number of character printed.
- printf displays the text you put inside the double quotes.
- printf requires the backslash character – an escape sequence – to display some special characters.
- printf can display variables by using the conversion character that is %d.
scanf function is used to store the data variable. The scanf function read a information from the standard input device (keyboard).
scanf (“Conversation specified”, variable): The conservation specified argument tells scanf how to convert the incoming data.
- scanf start with a string argument and may contain additional argument.
- Additional argument must be use with and address for locate Memory variable.
- scanf returns the number of successful inputs.
- scanf store variable value using &(Address) variable.
scanf function :
Clrscr and getch Function :
Clrscr() function is used to clear the console window.
Getch function is used to get the output and hold the screen until result not show.
Sqrt, abs and Pow Function
Sqrt, abs, Pow Function is the Basic concepts of C programming language :
It show the square root value.
It shows the Absolute value.
It shows the power of given number.
DATA TYPES :
- Each variable we have to attach with data type.
- Data type determines the how much storage space is allocated to variables.
- Data type define the permissible operation on variable.
- The variable must be declared by specifying the data types.
- Number data, decimal data or character data use for create a program.