Skip to main content
                   Basic C Program
               ===========

​C is a high-level language (language which is understandable to humans to communicate with machine) which lies between assembly language and high-level language.

​It is mainly a procedural programming language that makes user (or programmer) to program using the specified functions buit-in its predefined library. It also provides the feature to create user-defined functions (functiins created by user/programmer with his/her own choice).

​Lets have a look at the basic C-program.

​#include <stdio.h> //pre-processor directory

​int main( ) //defining main() function
​{
​    printf("IT IS FIRST C-PROGRAM AT ITKNOWLEDGE");
​return 0;
​}

​OUTPUT :-


And the program will look in Turbo C++ like :-


​Every C-program starts its execution with the function main() and the compilation process starts with the preprocessor directives (i.e. #include ...). We shall use here Borlands Turbo C++ (now outdated) for programming in C ,which is free to download and  provides IDE(Integrated Development Environment)facility, which is a compiler, not interpreter.

​#include <>
​Every preprocessor deirective has the above format for using the header files. Each header file has functions defined in it to use in the program irrespective of defining them too.

​printf("")

Every function has been defined in its preprocessor directory. printf() has been defined under <stdio.h>​ header file. This function let the user to print desired message(s) to the console monitor (at the display during running of program). Anything written in it is just displayed as it is. Like if we would have written the command as:-

​​printf("I'M LEARNING THROUGH ITK SITE");

​It will give the OUTPUT as:-



​OUTPUT.
​This isn't any function or keyword for C-programming. It actually means the result that will be shown at the screen after the execution of program.

C-language defines its statement till semi-colon( ; ) appears.

Codes in C-programming can be written in as single-line code. As the above code could be written as:-

​#include <stdio.h> int main( ){printf("IT IS FIRST C-PROGRAM AT ITKNOWLEDGE");​return 0;​}
It doesnot affect the OUTPUT of the program. All you have to be careful about is its syntax.


​Basically, C-language is now outdated programming language, but is good to clear the basics and create the mindset towards programming languages. It has emminent feature that let us to clearify our logic to code in specific situation.

​                                                            Regards,
​                                                            ITK

Comments

Popular posts from this blog

ASCII TABLE || HEXADECIMAL TABLE

ASCII & Hexadecimal Table (CLICK THE IMAGE TO VIEW IT PROPERLY) REGARDS, ITK

How to install Linux OS in Windows || How to install Linux On Windows

INSTALLING LINUX​================ ​ ​ ​ ​ ​How Linux in Window? ​Linux is widely used by the organisations where security and performance along with multiuser-multitasking (many more features are out there, you can check it by clicking here .) are priority. The main issue arises when we've to learn how to operate linux so that could be easier (for begineers  specially) to get marks in the preferred institute and jobs. Linux is not only all about these, mean getting marks and jobs, means who'll really care for those if one got Linux knowledge to have more self-employeed jobs while having fun of its open source codes. ​Another issue arises when we've to install Linux in pre-existing OS. Here, Windows OS for the installation will be used. ​ (​If you wish to see the clip for Linux installation, Click here .) ​ ​INSTALLATION ​The following steps tell you how to install linux on Windows OS. ​ ​1. Download the VMWare Workstation . ​ ​     ...

INSTALLING TURBO C/C++ IN WINDOWS || INSTALLING TURBO C++ || INSTALLING BORLAND'S TURBO C++

Borland's Turbo C/C++ has been making the novices to know the power of coding with interest beside of being outdated since 1987. It was noted for its integrated development environment, small size, fast compile speed, comprehensive manuals and low price availability. But now it's completely free to download and use. You can download Turbo C/C++ of Borland's (according to your PC's requirements) by clicking here. TO SEE THE INSTALLATION VIDEO CLICK HERE . After the download is completed, follow the following steps (picture-wise too) after opening it : 1. Double click the application to start installation. 2. Now click next. 3. Accept the license aggreement to continue to install by clicking intsall button. 4. The installing page will look like - 5. After the installation is completed soon, click read me if you wish to see its license aggreement. 6. Otherwise you can continue by clicking finish. 7. Now go to the desktop and search ...