C Langauge (English)

Introduction

C is a general-purpose and high-level programming language that is ideal for developing portable applications or firmware

Constants

The value of a constant cannot be changed during execution of the program, neither by the programmer nor by the computer.

Variables

Variable is a named location in a memory where a program can manipulate the data. This location is used to hold the value of the variable

Keywords

Keywords are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are part of the syntax and they cannot be used as an identifier.

Rules to Write a Program

In instead of this, we would write our first Cprogram now. Once we have done that we would see in detail the instructions that it made use of.

Main Function

Every C program has a primary (main) function that must be named main. If your code adheres to the Unicode programming model, you can use the wide-character version of main.

Comment

Comment about the program should be enclosed within /* */. Any number of comments can be written at any place in the program. For example, a comment can be written before the statement.

Printf Function

The printf() function are used for output in C language. printf function are inbuilt library functions, defined in stdio.h (header file). The printf() function is used for output. It prints the given statement to the console.

Scanf Function

The c program needs to get input from the user, we should use scanf function.

Instruction

In C, Instructions are the commands in the program that instructs the compiler to do certain action and it gives the instruction to the compiler on how to get results of the program.

Type Declaration Instruction

Type Declaration instruction is used to declare the type of variables to be used in a C program. Any variable must be declared before using it. This declaration is done using type declaration instruction.

Arithmetic Instruction

Arithmetic instruction consists of a variable name on the left hand side of = and variable names & constants on the right hand side of =.

Control Instructions

Control flow from one command to the next. Nonetheless, in most C programs the programmer may want to skip instructions or repeat a set of instructions repeatedly when writing logic. This can be referred to as sequential control flow.