C Language


What is C Language ?
C is a high-level and general-purpose programming language for developing real time applications. That was developed by Denis M. Ritchie to develop the UNIX operating system at Bell Labs in the yeat of 1972.

What is Low level language ?
Low level languages are machine dependent. That is they execute only on the type of computer for which they are written. This language are difficult understand because it is written in binary(i.e, 1 and 0) language.

What is High level language ?
High level languages are machine indepindent. They can execute on all types of computers. In this compiler translates the high level language ptogram into machine language of that particulat computer.
Ex : C, C++, C#, Java etc



Features of C language :

1. Simple : C is a simple language it provides structured approch(i.e, break the problem into parts), rich set of library functions, data types .

2. Machine independent or portable : C program cam be executed in many machies with little bit or no change. But it is not platform-independent.

3. Structured prorgramming language : It means we can break the program into parts using functions. So, it is easy to understand and modify.

4. Rich library : C provides a lot of inbuilt functions that makes the development fast.

5. Speed : The compilation and execution time of C language is fast.

6. Extensible : C language is extensible because it can easily adopt new features.

7. Recursion : In C, we can call the function within the function. It provides code reusability for every function.

8. Memoty Management : It supports the feature of dynamic memory allocation. In C language, we can free the allocated memory at any time by calling the free() function.

9. Pointer : C provides the feature of pointers We can directly interact with the memory by using the pointers. We can use pointers for memory, structures, functions,array etc.

10. Midile-level language : User can use C language to do system programming as well as application programming.





Editors for C language :

1. Code Blocks.
2. Turbo C++.
3. Atom code.
4. Sublime text.

Compilers for C language :

1. GCC(GNU Compiler Collection) : The GNU operating system is a software system, upward-compatible with Unix. GNU stands for "GNU's Not Unix". It means Linux.
2. MinGW(Minimalist GNU for windows).
3. Clang.

Turbo C++ Editor download and Installation process :

1. To download  Turbo C++ from google to specified link
2. After downlod to extract that Turbo C++ file and then click to install.


3. In this process one new window will been opened click Next.


4. The licence, terms & conditions window will been opened. To check the I accept the terms in the license agreement and then click Next.



5. The ready to install window is opened  then click on Install



6. After installation is completed the InstallShield wizard completed window willl been opened then click finish.



7. To open Turbo C++ editor in windows and click Start Turbo C++



8. The C editor is opened then to click on file and select new




9. Then to type the program and save a program with the file extenstion .c
To save : F2
Compile : Alt+F9
Run : Ctl+F9






TDM-GCC compiler download and installation process :

1. To install a TDM-GCC(TDM stands for Twilight Dragon Media it is project's name-GNU("GNU's Not Unix") Compiler Collection) compiler though google after complete download process to click on that file the below window is opened and to click Create.



2. The selection Edition window is opened and click Next.



3. The license changes winow will been opened and then click next.



4. The New installation directory window is opened and click next.



5. In new installation to click install.




6. The installation process is started.



7. The installation is complete and click next




8. And then click finish.



9. To write code in note pad and save with file extenstion of (.c) and open in command prompt to execute.






Compiler :
The purpose of compiler is it changes the statements written in a particular programming language of code into machine level language(i.e, binary format 1 & 0). The exection process is parallel. The Examples are C, C++

Interpreter :
It is used to to execute the code in line by line. Examples are Java, Ruby, Python

Commands :
1. Cd : Change directory




2. Cd.. : Go back to the windows folder.



3. D: To change the drive in D in CMD




4.  cd /d c:\windows : From D folder go back to the windows



5. Mkdir : It is used to create the new directory file.



6. Dir : It is used to folders appear in the list.


7. Ren : To rename the existing folder



8. color : To change console color




9. Ping : The ping command is usually used as a simple way to verify that a computer can communicate over the network with another computer or network device. the ping command operates by sending internet control message protocol(ICMP) Echo Request message to the destination computer and waiting for a response.







Applications of C language :

1. C language has been an integral part of the development of multiple operating systems. Unix-Kernel, Microsoft windows utilities and operating system applications, and a large segment of the Android operating system.
2. Development of new languages like  C++, Java, C#, JavaScript etc
3. Computation platform: C implements algorithms and data structures
4. Graphics and Gaming

Addition with intialization of variables :







Addition without initialization :







Is it possible to print char more than 255 characters :






Size of data types :





Concatenation of three strings :






Gap between string :




Even or Odd :




Given num is Prime or not :




Using ternary :




Using ternary to display even or odd :




Using multiple ternary operator :




To perform addition operation using function :




Multiplication table using function :





To Print given pyramid :





To find area of given image :






Towers of hanoi :






logoblog
Previous
« Prev Post