Knowledge in c language

Function in c language

Function in c language.

Block diagram of computer and it's functional description.

This is the basic block diagram of a computer. It consists of key board, mouse, CPU, speakers,monitor, printer, hard disk,etc. These are the hardware components of a computer. Coming to the internal part, data I sent through input devices as input . It is sent o the secondary storage or primary storage . Then control unit controls the entire system and arithmetic logical unit performs all the computational operations. Finally information is obtained as output .CPU consists of MMU ,CU,ALU.

Steps for problem solving.

We have 8 main steps for solving the problem. 1.defining the problem. 2. Designing the problem 3. Coding the program 4. Testing and debugging the program. 5. Syntax errors. 6. Logic errors. 7. Run time errors. 8. Maintaining and upgrading the program.

About algorithm and essential properties of an algorithm

The main essential properties of an algorithm are characters of an algorithm. Simple , definiteness, finiteness,input/output,generality, effectiveness. Simple means,the algorithm should be simple to understand. Definiteness means each and every step should have a definite meaning.

Types of algorithm , advantages and disadvantages of algorithm.

There are 3 types of algorithms . Sequence algorithm, repetitive algorithm, steps involved in developed algorithm. There are many advantages of algorithm. It is a step by step procedure. It is independent of programming language. We also have the example of an algorithm.

Flow chart description and example of flow chart.

Flow chart is the pictorial representation of an algorithm to solve the problem.they are very much useful in documentation of a program . There are few symbols that represents a specific activity of that symbol. This flow chart helps in detail clarification of a program logic.

History of c language and history development of c

C language is one of the most popular computer languages in today's world. ALGOl was the first language introduced in 1960. Later in 1963 , CPL was introduced. Afterwards in 1967, BCPL was came into the picture. Then in 1970 B language was introduced. Modifying B language, in 1972 C language was introduced.

Program to read two valued and explain arithmetic operators.

This is a simple c program to explain arithmetic operations. Using 6variables and two values, we performed different operations like addition, subtraction,division, multiplication. Header files stdio.h and conio h are used to accept getch(),clrscr(), printf,scanf .

Program to explain type casting.

Type casting means changing of one data type into other. type casting is of two types implicit and explicit. Implicit means the compiler will automatically converts the data type into other. Explicit means we have to mention the data type it wanted to be changed in.

Program to explain simple if.

Simple if is used to check a simple condition like yes or no . Let us introduce two variables a,b . If a is greater than b then a is greatest. This is the format of simple if condition. It includes two header file studio.h and conio.h to include all the files that we include in a program.

Program to explain if-else condition that is to find the maximum between two numbers.

If else condition is used to check the condition if a is greater than b then a is greatest otherwise b is greatest.. if(a>b) Printf(.....); Else Printf(.....); This is the syntax of if else condition.

Program to perform if else if ladder performing average of 3numbers.

If else if ladder is used to check more than 3 conditions it means multiple conditions in a single program. Here I considered m1,m2,m3,tot ,avg as variables of data type integer. First perform total then average . Finally checking the conditions by some range is to be performed.