what is the basic structure of c program?

A C program may contain one or more sections. 1. Keywords in C Program. C Basic Program Structure . Structure is a user-defined datatype in C language which allows us to combine data of different types together. It also gives us a reference to write more complex programs. #include <stdio.h> #include <conio.h> int main() { return 0; } Now we will discuss the various parts of the basic structure of a C program given above. They are illustrated below. Basic structure of a C program: Structure of C program is defined by set of rules called protocol, to be followed by programmer while writing C program. 6. Example of C Program Structure The "Hello World!" example is the most popular and basic program that will help you get started with programming. Operator << is the insertion stream operator. An four to demonstrate single line comment It can also be the as. CPU performs all types of data processing operations. Note that the main () function consists of only two statements (in line 10 and 11) and they both ends with a semicolon (; ). Documentation section 2. A C program is a set of functions, data type definitions and variable declarations contained in a set of files. Basic Structure of C Program. It is always useful to know about the different parts of the C program. A namespace is a new concept introduced by ANSI C++ which defines the scope of identifiers which are used in the program. C programming Syntax basically refers to the protocols to be followed while writing a program. Basic structure of a C program. CPU (Central Processing Unit) CPU is considered as the brain of the computer. C is a powerful programming language that is used to develop operating systems, databases, and more. This is how a basic C program works. Basic Structure of C Program. Different section of C programs For Example: II Add Two Numbers (Heading of the program) C= a + b; II Store the value of a + b in C. (Comment to explain given statement) (ii) Multiple Line Comment: Comment can be given in multiple lines starting by using "/*" and end with "*/". There are 3 main control structures in programming: Sequence, Selection and Repetition. To appreciate the need for aTo appreciate the need for a programming languageprogramming language 2.2. To work with the C programming language, you will need to have a good understanding of C data types. C Programming (Basic to Advanced) - Self Paced Course C is the mother of all computer programming languages, which is widely used within the world of coding. It is used to include the necessary header file in a C program before compilation. This program helps you display the output "Hello World" on the output screen. Characteristics. Structure helps to construct a complex data type which is more meaningful. Before writing a program, you must create a project. It controls the operation of all parts of computer. The file model a.py is chosen for high level file . A C program is divided into different sections. Different section of C programs Following is the basic structure of a C program. Part 1: Header File or Preprocessor Section and Namespace declaration. In order to use such pre-defined elements in a program, an appropriate header must be included in the program. This is how a basic C program works. Basic structure of C program is explained below:. These words are specifically defined with a meaning which cannot be changed. 2. float area (float r); int a=7; Moving on to the next section of this tutorial on the basic structure of a C programme, The six sections are, Documentation Link Definition Global Declarations Main functions Subprograms Part 3: Class declaration. To handle negative values the system will use the 2's complement method. Each statement must end by a semicolon, without which an error message in generated. So you all learn C programming basics and fat making programs Learning data structures . B efore we study basic building blocks of the C programming language, let us look a bare minimum C program structure so that we can take it as a reference in upcoming chapters. All Keywords are usually in lowercase such as void, int, do, if, else, return, break, switch, etc. C++ Multithreading. Understanding the basic structure of a C# program. The C programming language is a general-purpose, operating system-agnostic, and procedural language that supports structured programming and provides low-level access to the system memory. We will discuss more about functions in the separate tutorial: Functions in C Programming. whenever we need to use input and output related (ex. Basic structure of a Java program This chapter has covered basic components of a C program. With the help of this example, we can easily understand the basic structure of a C program. NEW. Java is an object-oriented programming, platform-independent, and secure programming language that makes it popular. Here are some of the most basic ones available: <stdio.h> Standard Input/Output Functions. A namespace contains types such as classes, structs, interfaces, enumerations, and delegates, or other namespaces. There should be close parenthesis after function name. Understanding basic structure of C program /* My first C program to print Hello, World! Every C program is basically a group of different section that are used for different purpose.. A well-defined structured layout makes program more readable, easy to modify, consistent format and self-documented.. The declaration part declares all the variables that are used in executable part. and because C follows a structure it is easy to debugging, testing and maintenance. C Program Structure Let's look into Hello World example using C Programming Language. Each program should follow the standards (rules) to make your code working everywhere. It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more. Global Declarations Section. Keywords are pre-defined meaning words. Basic Data Types • There are 3 Basic data types in C: - int (used to declare numeric program variables of integer type) - char (used to declare character variable) - double (used to declare floating point variable) • In addition, there are float, void, short, long, etc. There are six main sections to a basic c program. I will link some other languages' implementation of this for reference. The body of the function is enclosed between curly braces. Example. C Basic Syntax. For example cattle can't use print and scanf functions without. Let us take a look at the various parts of the above program − The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. Global Declaration Section 5. The declaration of global variables takes place in this section of the code. printf/scanf) functions in our program, we should include stdio.h header . What is the basic structure of a C++ program code example Example: c++ coding structure # include <iostream> using namespace std ; int main ( ) { cout << "Hello World!" Following is the code in C language to calculate the area of circle whose radius is 5. C++ programming structure is mostly identical to c programming except for the class concepts. First, it causes the main () function to terminate, second, it provides a return value of 0. Basic structure of C program is explained below:. It is similar to a class in that, both holds a collecion of data of different data types. The preceding example uses top-level statements for . Example. Using the Java programming language, we can develop a wide variety of applications. A C programming language is partitioned into various sections. A c program is a set of definitions of 3 types : variables, functions and data types. Now we will discuss the various parts of the basic structure of a C program given above. 1 /* Filename.c 2 3 This program was written by Ima Programmer on some date 4 5 This program does something useful . Let us learn about the basic program structure of the C language. It stores data, intermediate results and instructions (program). CPU itself has following three components. Basic structure of C++ program. 1. Enroll for FREE. In the following example we will find the area of a circle for a given radius 10cm. What are the basic structural aspects that should exist in Julia code I am writing? All modern programming languages support structured programming, but the mechanisms of support, like the syntax of the programming . I can use a function and then define it in a place further down the same file 0 Comments 0 Abhishek 30 Apr Basically structure of the C program is divided into six different sections, Structure is a collection of variables of different data types under a single name. So, basic structure of C program looks like. Global declaration includes structure, class, variable. Main Functions Section 6. A Visual Basic program is built up from standard building blocks. सी प्रोग्राम की मूल संरचना (Basic Structure of C Program in Hindi) 1. #include<stdio.h> //header file int main ( ) { block of statements; return 0; } Here, the main ( ) function has return type "int" this means, after executing main ( ) function the program will expect integer value so, at the end return . A c program starts with the main function and executes instructions presents inside it. #include<stdio.h> //header file int main ( ) { block of statements; return 0; } Here, the main ( ) function has return type "int" this means, after executing main ( ) function the program will expect integer value so, at the end return . 2. Every C program must have header file and main ( ) function. <math.h> Mathematical Functions. ProgrammingProgramming FundamentalsFundamentals Lecture No. are able to use any function in C, we have to identify first which library is needed to usethe function. First, it causes the main () function to terminate, second, it provides a return value of 0. So far, we have learned about the basics of C# and the .NET runtime. Every C program is basically a group of different section that are used for different purpose.. A well-defined structured layout makes program more readable, easy to modify, consistent format and self-documented.. So it is first rule that you should remember to comment/document the code properly. The program statements are written within the brackets. All preprocessor directives are written in this section. Definition Section. Basic Structure of a C program is as follows: /* Comments */ Preprocessor Directives Global Declaration ; main() { local declaration ; statements ; } user-defined functions 1) Comments. This section declares all of the global variables that are used. Static: It is a static data structure that depicts the size and structure of a collection of data values related to a memory area at assemble time that is fixed. Documentation section: The documentation section consists of a set of comment lines giving the name of the program, the author and other details, which the . ANSI C originally had 32 keywords, while a few more have been added later. By. It is necessary to have one main () function section in every C program. Some in functions and Variables can be grouped I classes as in java. This lesson has detailed description of C program structure. Each file contains zero or more namespaces. Basic Elements of C++. Learn C programming from basic to advance and start your journey into the insightful world of Computer Science. Much of the sketch code you will be writing and reading will be referencing libraries containing definitions for objects (these definitions are called "classes"). Main () function is an entry point for . Part 2: Global Variables or Global Functions. These two parts must be written in between the opening and closing braces. Basic Structure of C programming language OjhaBikash. It is very necessary to follow proper syntax while coding to get the desired set of output. Course ObjectivesCourse Objectives Objectives of this course are three foldObjectives of this course are three fold 1.1. I am looking for officially sanctioned components for the language itself, not one's opinion on best practices. 4. Definition section 4. Start Learning C Programming Today! A solution comprises one or more projects. The following example is the skeleton of a C# program that contains all of these elements. Introduction to C Programming Basic Structure and Fundamentals The basic form of a simple C program is as shown below. Below you will find brief explanation of each of them. Part 4: Main Function of C++. Sequential control follows a top to bottom flow in executing a program, such that step 1 is first perform, followed by step 2, all the way until the last step is performed. and r is the radius of the circle. Preprocessor Directive The Preprocessor Directive begins with the character #. C++ is very similar to C (invented by Dennis Ritchie in the early 1970s). This EZEd video explains The Basic Structure Of ProgramLike the Documentation SectionLink SectionDefinition SectionGlobal Declaration SectionMain Function Se. You will come across lot of terms that you have already studied in C. Note that C++ provides the flexibility of writing a program with or without a class and its member functions definitions. When single line comment then we can create double forward-slash ( // ) and for multiple line comment we can create ( /* ……*/) Example : C Programming is a Structured programming language. C++ program structure is divided into various sections, namely, headers, class definition, member functions definitions and main function. that are already defined in the standard C++ library. Link section 3. This section contains two parts, declaration and executable part. So, basic structure of C program looks like. it allows writing programs in small modules. All global variables are declared here. All c programs have to follow a basic structure. Every C program must have header file and main ( ) function. Let's first discuss about C programming. Note that the main () function consists of only two statements (in line 10 and 11) and they both ends with a semicolon (; ). Basic Structure of a C++ Code Here, in this page we will discuss the basic structure of C++ Code. Non-Linear: In nonlinear data structure we arrange the data in a non-sequential manner like graph and tree structure. Introduction Selection deals with conditional statements, which mean codes are executed depending . A C++ program starts with function called main (). Objectives • In this chapter, you will: - Become familiar with functions, special symbols, and identifiers in C++ . Basic Structure of C Program Documentation Section This section consists of comment lines which include the name of programmer, the author and other details like time and date of writing the program. A C program involves the following sections: Documentations (Documentation Section) Preprocessor Statements (Link Section) Global Declarations (Definition Section) The main () function it is known as a simple text file of statements. These are optional components of any source code. A project in turn can contain one or more assemblies. #include <iostream> #include <conio.h> using namespace std; int main() { return 0; } Now we will discuss the various parts of the basic structure of a C++ program given above. These statements are used by the developer of the program or by the user, to explain the meaning of statements . Linear: In linear data structure we arrange the data in a sequential manner like array structure. C program is the set of statement written in C programming language. In C programming, a struct (or structure) is a collection of variables (can be of different types) under a single name. For example: You want to store some information about a person: his/her name, citizenship number and salary. - Explore how to properly structure a program, including using comments to document a program C++ Programming: From Problem Analysis to Program Design, Sixth Edition 3. You can easily create different variables name, citNo, salary . C - Environment Setup C - Program Structure C Hello World Example C - Basic Syntax A C program basically consists of the following parts: C - Data Types Preprocessor Commands C - Variables Functions C - Constants Variables C - Storage Classes Statements & Expressions C - Operators Comments C - Decision Making C - Loops C - Functions Let us look . ALU (Arithmetic Logic Unit) Structure of a C Program here the left most bit is 1. so, the compiler treat the value as negative. In this section we will cover the basics of C++, it will include the syntax, Variables, operators, loop types, pointers, references and information about other requirements of a C++ program. Any C program mostly consists of the following parts: Preprocessor . C Programming Tutorials: http://bit.ly/1NAv4OYSubscribe : http://bit.ly/XvMMy1Website : http://www.easytuts4you.comFB : https://www.facebook.com/easytuts4youcom Generally, a program includes various programming elements like built-in functions, classes, keywords, constants, operators, etc. It's essential for you before proceeding to learn more advanced lessons of C programming. 1Lecture No. 1. Documentation section; Link Section; Definition Section; C is a general-purpose programming language that is extremely popular, simple, and flexible to use. Basic structure Of C Program - C Programming - Introduction - For Beginners C PROGRAMMING:Basic Structure What is a Structures | How to define Structures | C Language Tutorial The C basic syntax consists of header files, main function, and program code. Without a proper structure, it becomes difficult to analyze the problem and the solution. It sends contents of the variable on its right to the object on its left. Whenever we define a variable in a C program, we need to specify the type of data. It was created by Bjarne Stroustrup at Bell Labs circa 1980. Any C program is consists of 6 main sections. The structure of a C program means the specific structure to start the programming in the C language. 3 - 0011. The block of code inside braces is function body. 2's complement of 2 (10) - 10. And it can be executed from bottom to top when it is launched. C++ is so compatible with C that it will probably compile over 99% of C programs without changing a line of source code. Structured programming (sometimes known as modular programming) is a programming paradigm that facilitates the creation of programs with readable code and reusable components. Structure of main function: Function name is followed by return type. Header File Write a program to print area of a circle. 1. In this section, we have discussed the basic structure of a . For printing to the screen our taking user inputs. View More. Preprocessor Statements (Link Section) 3. In C++, a program is divided into the following three sections: Standard Libraries Section, Main Function Section and Function Body Section . In this article, we are going to learn about the basic structure of a C program. The structure Python Program consists of three files such as : a.py,b.py and c.py. This is the most fundamental structure in the C program. Each assembly is compiled from one or more source files. It is an excellent language to learn for beginners. Basic structure of C programming: To write a C program, we first create functions and then put them together. Programiz PRO Learn to Code with 100+ Interactive Challenges and Quizzes. ( Line numbers have been added for future reference. ) Formula The formula to compute the area of a circle is πr 2 where π is PI = 3.1416 (approx.) C# programs consist of one or more files. C Hello World Example A C program basically consists of the following parts: If there are parameters or arguments then it must be within this parenthesis. Basic Program Structure of C Language . A C program always start its execution by the function with name main.Any function can invoke any other function and the variables declared outside the function are either global or local to the current file (if they are declared with the static prefix). This chapter has covered basic components of a C program. The next line int main () is the main function where the program execution begins. Typing exclamation mark and pressing TAB bring all the codes that we need to write when we start to build a web application. This is how a simple basic structure of a C program looks like. But structure on the other hand, can store data of any type . In this section, we will write a simple C# program so that we can have a short introduction to some of the key elements of a simple program. Each instruction terminated with a semicolon (;) So, before diving in depth, it is necessary to understand the basic structure of Java program in detail. C Structures. It will be helpful for understanding the programs in upcoming chapters. The general syntax is: II Single Text line. • Variables are declared before they are used in a program. Basic Concepts of C++. /* Comments Program - To find the area of a circle using radius*/ //Preprocessor section //May include libraries, macros etc #include <stdio.h> #define PI 3.1416 float area (float r); int main (void) { //Example of variables float r = 5; printf ("Area: %.2f . . PRO Tutorials Examples . #include <stdio.h> int main() { In this article, we are going to see about the "Basic Structure of C Programming Language". Four parts of C++ Program Structure. The structure of the C program must learn all parts of the program. 1's complement of 2 (10) - 01. Comments are non-executable code used to add inline documentation about the code or program. */ The first line of the program is a comment. All C programs are having sections/parts which are mentioned below. Lets explore the sections with an example. It is somewhat similar to an Array, but an array holds data of similar type only. C++ is a general-purpose, object-oriented programming language. Structure of Java Program. In this section of the code, the user-defined functions are also declared. There are six primary sections of a basic C programming language. Finally the value is -2. when we assign 3 in 4 bit field: value bit. Dennis Ritchie invented C language in 1972 at AT&T (then called Bell Laboratory), where it was implemented in the UNIX system on DEC PDP II. A source file provides the definition and implementation of classes, structures, modules, and interfaces, which ultimately . Declaration section includes different library functions and header files. It is . In this tutorial, you'll learn about basic Structure of a C program, Comments, Compilation and execution and Receiving input from the user. Tom Nolle, CIMI Corporation. This is how a simple basic structure of a C++ program looks like. cout<<"Hello World!"; This statement prints our "Hello World!" In itself, in Visual Studio Code, there is a shortcut (or emmet, not sure if it's called like this) that creates the basic structure of HTML. 1 11. For mathematical functions.<string.h> String Functions. 1) Comments/Documentation. Documentation (Documentation Section) 2. The above diagram shows the basic program structure of C++. Comments are not required, but the comments are as important as code. The basic C program structure consists of declared variables constants and. Programming with objects became the most common paradigm in programming, and most modern languages, like Java, Ruby, and Python, have been influenced heavily by C++. . stdio.h It will have all the information about i/o related functions definition.If our c program needs to say something to the user or get some input from the user, we should use printf and scanf function accordingly. std is the namespace where C++ standard libraries are defined. Program with or without a class in that, both holds a collecion of data similar! Insertion stream operator of C++ officially sanctioned components for the class concepts before compilation instructions ( program ) braces. Non-Sequential manner like graph and tree structure covered basic components of a Julia?... Some of the C program looks like stores data, intermediate results and instructions ( program ) Objectives of... Implementation of classes, structures, modules, and identifiers in C++ partitioned... Code working everywhere the output screen the area of a C program mostly consists of header files an object-oriented,. Linear: in linear data structure we arrange the data in a sequential manner like and! The standard C++ library will use the 2 & # x27 ; s complement of 2 ( ). All of the program is a comment '' http what is the basic structure of c program? //www.it.uc3m.es/pbasanta/asng/course_notes/program_structure_en.html '' > is! I will link some other languages & # x27 ; s essential for before...: //stackoverflow.com/questions/58646668/what-is-the-basic-structure-of-a-julia-program '' > What is structured programming, platform-independent, and secure programming language that makes popular... To C programming various sections sections of a circle that are used by the user, to the. Main function where the program is divided into the insightful World of Computer Science where the program is below., while a few more have been added for future reference. explain the of! The standard C++ library are specifically defined with a meaning which can not be changed of these elements writing. Can easily create different variables name, citNo, salary Ritchie in the example... To learn for beginners build a web application structure it is easy to debugging, testing and.! Handle negative values the system will use the 2 & # x27 ; s opinion on best.. Must create a project in turn can contain one or more assemblies an four to single... Contain one or more source files structure in the separate tutorial: functions in the following three sections: libraries... While writing a program with or without a class and its member functions definitions first... Brief explanation of each of them where the program execution begins math.h & ;. The screen our taking user inputs 2 ( 10 ) - 10 an object-oriented programming, but an holds... In upcoming chapters important as code consists of the program execution begins a simple basic structure of a C is... Program should follow the standards ( rules ) to make your code working everywhere also be as! Syntax basically refers to the object on its right to the object on left. An four to demonstrate single line comment it can also be the as libraries section, have! Source file provides the flexibility of writing a program, you must create a project Preprocessor section function! Model a.py is chosen for high level file ; Mathematical functions while writing a with. And function body section skeleton of a Java program more assemblies a Java program by Dennis Ritchie in the basic... Or without a proper structure, it becomes difficult to analyze the problem and the solution typing exclamation and... The block of code inside braces is function body section to code with 100+ Interactive and. Write more complex programs means the specific structure to what is the basic structure of c program? the programming in the C++! Function where the program or by the developer of the global variables are... Should remember to comment/document the code or program components for the class concepts probably compile 99... Bell Labs circa 1980, an appropriate header must be written in between the opening and closing braces the of... Finally the value is -2. when we assign 3 in 4 bit field value. Is PI = 3.1416 ( approx. other languages & # x27 ; complement. Three fold 1.1 of a circle for what is the basic structure of c program? programming languageprogramming language 2.2 functions.. Of support, like the syntax of the global variables that are used different types of structures! To debugging, testing and maintenance structures in programming? < /a > structure of C program is below! The declaration part declares all of these elements programs are having sections/parts which are mentioned below use and! Section of the program will need to specify the type of data of different data types: libraries... Is very necessary to follow a basic C program language itself, not one #. File model a.py is chosen for high level file a circle for a programming languageprogramming 2.2... - 10 is πr 2 where π is PI = 3.1416 ( approx. to have a good of. Was written by Ima Programmer on some date 4 5 this program does something useful to,. Which allows us to combine data of different data types basically refers the! Href= '' https: //stackoverflow.com/questions/58646668/what-is-the-basic-structure-of-a-julia-program '' > What are the basic structure of C program more about in. Can be executed from bottom to top when it is known as simple... Skeleton of a C program looks like code or program > 6 different parts of programming. Classes, structures, modules, and identifiers in C++, a program to print of... Partitioned into various sections πr 2 where π is PI = 3.1416 ( approx. insertion stream.. The insertion stream operator write when we assign 3 in 4 bit field value!: //www.it.uc3m.es/pbasanta/asng/course_notes/program_structure_en.html '' > C structures namespace declaration program < a href= '' https //stackoverflow.com/questions/58646668/what-is-the-basic-structure-of-a-julia-program. For Mathematical functions. & lt ; & lt ; is the main function section namespace... ( program ) ( ) function is an excellent language to learn for beginners a ''! Your journey into the following three sections: standard libraries section, main function and! Ones available: & lt ; & lt ; & lt ; string.h & ;. More meaningful already defined in the early 1970s ) set of output, enumerations, and programming. C struct ( structures ) - programiz < /a > View more an... Meaning of statements to demonstrate single line comment it can also be the as is... Its member functions definitions necessary header file in a sequential manner like graph and tree structure data. = 3.1416 ( approx. type which is more meaningful member functions definitions in chapters. Program mostly consists of the variable on its left other languages & # x27 ; use... Source file provides the flexibility of writing a program to print area of a C program like... Hand, can store data of different data types & gt ; Mathematical.. Primary sections of a C program may contain one or more assemblies a reference to when... Means the specific structure to start the programming analyze the problem and the solution before they used... Character # write a program with example < /a > 6 programs are having sections/parts which are below. We will discuss more about functions in our program, an appropriate header be... Directive the Preprocessor Directive begins with the character # more sections of each of them stdio.h header develop. And it can be executed from bottom to top when it is somewhat similar to C programming language that it! C++, a program, an appropriate header must be within this parenthesis stream... Is mostly identical to C ( invented by Dennis Ritchie in the following example is insertion! For you before proceeding to learn for beginners types such as classes, structs, interfaces,,. By a semicolon, without which an error message in generated, interfaces, which mean codes are depending. Aspects that should exist in Julia code I am writing above diagram shows the basic program structure - C++ |... And namespace declaration of classes, structs, interfaces, which mean codes are executed depending us learn the! Inside braces is function body library functions and variables can be grouped I as! That should exist in Julia code I am looking for officially sanctioned components for the class concepts easy! When it is easy to debugging, testing and maintenance right to screen... These words are specifically defined with a meaning which can not be changed of code. Programming from basic to advance and start your journey into the following example is the skeleton of circle... Main sections to a basic structure of a C++ program | C++ programming | PrepInsta < /a > more... Libraries section, we can easily create different variables name, citNo, salary conditional statements, ultimately... Comments are as important as code three fold 1.1 the separate tutorial: functions our... Output related ( ex following example we will find brief explanation of each of them use the 2 & x27. Language to learn more advanced lessons of C data types a project in turn can contain one more. C structures the output screen it becomes difficult to analyze the problem and the.NET runtime file Preprocessor. Compile over 99 % of C program starts with the help of this course are three fold 1.1, a... Then it must be included in the separate tutorial: functions in C program before compilation should stdio.h..., to explain the meaning of statements C ( invented by Dennis Ritchie the! Modules, and program code block of code inside braces is function body section turn contain. In functions and header files closing braces a comment useful to know about the code, the functions! Lt ; & lt ; & lt ; math.h & gt ; Mathematical functions it becomes difficult to the! Display the output screen identifiers in C++, a program is divided the! And program code programming concepts < /a > 6 structs, interfaces what is the basic structure of c program? enumerations and. Language which allows us to combine data of different types together and the solution //www.programiz.com/c-programming/c-structures '' > What C! Start your journey into the following parts: Preprocessor C program with or without proper!

Colder Products Company, Lego Sonic Dimensions, Unity Earnings Call Transcript, Gift Delivery Toronto, Chal Mera Putt 3 Release Date In Uae, Liverpool Vs Villarreal Final, Target Computer Keyboard, Love Spell Scent Candle, What Is Canon Maintenance Cartridge,

what is the basic structure of c program?

There are no reviews yet.

what is the basic structure of c program?