What is C :
- The c programming language is a standardized programming language that was developed by Dennis Ritchie and Ken Thompson in the early 1970s at bells lab.
- It is one of the Best and most widely used programming languages
- It was designed to provide access to the low-level maps and to require less runtime support.
Steps involved in C languages :
Alphabets , digits , special symbols >>> constants, variables , keywords >>> instructions >>> programThe C character set:
Alphabets - A ,B,....X,Y,Z
a,b,c.....y,z.
Digits - 0,1,2,3,4,5,6,7,8,9
Special symbols - !, @ ,# ,%, ().../?$
Constants variables and keywords :
- A constant is an entity that does not change it is also called literals.
- A variable is an entity that may change and also called identifiers.
- A keyword is a special word In this language that carries special meaning.
Types of c constants:
Now C constants can be easily divided into two major categories :( A) Primary constants :
An integer constant, Real constant, Character
(B) Secondary constants :
Array, Pointer, Structure, Union, Enum
C keywords:
- There are only 32 keywords a label in C.
- The keywords cannot be used as variable names.
Begin with the first C program -
1. #include<stdio.h>
2. int main (void)
3. {
4. printf("hints4you");
5. return 0;
6. }
Line 1: #include<stdio.h>
Preprocessor :
1. #include<stdio.h>
2. int main (void)
3. {
4. printf("hints4you");
5. return 0;
6. }
Line 1: #include<stdio.h>
Preprocessor :
The C preprocessor is a macro preprocessor that transforms the program before it is compiled.
There are few of the common uses of C preprocessor are :
- Include header files
- Macros
- Conditional compilation
Header file :
The header file is a file which contains a function declaration and macro definition which is to be shared between various source file.
The header file is a file which contains a function declaration and macro definition which is to be shared between various source file.
It has two types:
- The files which the programmer writes.
- The files which come with the compiler.
Name Description
<complex.h> : A set of functions in this language for manipulating complex numbers
<complex.h> : A set of functions in this language for manipulating complex numbers
<stype.h> : Define the state of functions used to classify characters by their types or to convert between upper and lowercase in a way that is independent of the used character set.
<errno.h> : For testing error codes in this language reported by library functions.
<float.h> : Define macro constants find the implementation-specific properties of the floating-point library.
<stdnoreturn.h> : For specifying non returning function .
<string.h>: Define string handling functions .
<tgmath.h>: Define type generic mathematical functions .
<threads.h>: Define functions for managing multiple Threads as well as mutexes and condition variables.
<time.h> : Define date and time handling functions .
<uchar.h>: Types and functions for manipulating Unicode characters.
<wctype.h>: Define the state of functions used to classify white characters by their types or to convert between upper and lowercase.
Line 2: int main(void )
- It is the starting point from where the execution of the C program begins.
- The execution begins with the main ()function.
Line 3 and 6: {}
- Used to define a scope or function and control statements always start and ends with curly brackets.
Line 4: print("hints4you");
- The printer is a predefined standard library function to print the given string i.e. "hints4you" on standard output.
Line 5: return 0;
- The return statement returns the value from main () and 0 indicates the successful termination.
Data types:
- In the case of C programming language data types are seriously declarations for memory locations or variables.
- The C language provides the four basic arithmetic type specifiers char, int, float, double.
- The modifiers signed, unsigned, short and long.
Regards,
Hints 4 You.
Thank you for giving me your precious time.
We will meet again via the next post.*Features:
c (programming language) , c tutorial , programming language (software genre) , beginners , programming , language basics , data types , c language , basics of c language , c course, c programming language , c programming language tutorial , c programming language tutorial for beginners , c programming course , introduction to c programming language
0 Comments
Please do not enter any spam Link in the comment box. If you have any queries, Let me know!