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

Calculator Using C Programming

  C  is not only capable in maximizing the logical concept towards machine/software programming but it also makes users comfortable through its in-built functions. Making of simple calculator in C must at least be done by the novices themselves to improve and test their level of understandings in logics being applied. Here is the code that has been created for the joy of creativity through C-coding. CODE #include <stdio.h> #include <conio.h> int main() {     int a,b,result;     char ch[2]; clrscr(); gotoxy(30,1);printf("CALCULATOR"); gotoxy(10,8);printf("FIRST NUMBER : "); gotoxy(4,9);printf("OPERATION(+,-,*,/) : "); //to choose operation from gotoxy(9,10);printf("SECOND NUMBER : "); gotoxy(16,12);printf("RESULT : "); gotoxy(30,18);printf("Powered By : ITK"); gotoxy(25,8);scanf("%d",&a); // input first number gotoxy(25,9);scanf("%s",ch); //input operation as a

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