Skip to main content

Posts

Showing posts from July, 2020

Introduction to C Programming - Part 01

Computer Program Computer Program           Set of instructions given to the computer. Programmers write programs in various programming languages. Programming languages can be mainly divided into :                       1. Low-level programming languages                                               -    Machine Language                                               -    Assembly Language                      2.  High-level programming languages Programming Languages Low-level programming Languages Machine Languages – Consist of 1 s and 0 s – Machine dependent – Computer can directly understand its own machine language – Tedious and error prone for programmers         Example:                 11001010000100101000010101110100             11000101010001110010101000110010 Assembly Languages –   English-like abbreviations called m nemonics formed the basis –   Clearer to humans but incomprehensible to computers –   Need

Coding Standards for C programming

 This document contains some of the coding standards that the students have to follow , when they are writing the programs. Indent style : Indent the entire body of each function to one level of indentation. Use three spaces or tab per level of indent. Select the size of the indentation you prefer and uniformly apply that throughout the program.                         If there are several levels of indentation, each level should be intended the same additional amount of space. Indent the statement/s in the body of an if statement If a statement is split across two or more lines, indent all subsequent lines.                         Indent the statement/s in the body of an while/for statements.                         Comments: Describe the purpose of each function in the program using a comment Add a comment to the right brace } of every function, to indicate the end of function. Add comments to describe the purpose of the statements in the progra