Posts

Showing posts from December, 2025

Programming in C

   Programming in C   College Exam Notes & Last‑Minute Preparation   Engineering students   About This Course This blog is designed for quick understanding, smart revision, and exam‑oriented preparation for the subject Programming in C . All concepts are explained in simple language , with important points, short notes, programs, and last‑minute tips . Syllabus Overview Prerequisite: NIL Category: ES Credits: 3 Total Periods: 45 🧩UNIT–WISE NOTES & PREPARATION 🔹 UNIT I – Computer and Programming Fundamentals Weight: High (Theory based) Important Topics: Computer fundamentals Evolution of Computers   Generations of Computers Classification of Computers Anatomy of a Computer (CPU, Memory, I/O) Introduction to  Software Hardware vs Software Programming Languages – Classification Compiling, Linking & Loading   Introduction to OS  Types of OS (Operating Systems – Types) Last‑Minute Focus: Definitions Diagrams (CPU bloc...

2.2 Algorithms

Image
       Programming in C     2 - 6  MARKS  What is an Algorithm? An algorithm is a finite sequence of well-defined, logical steps used to solve a given problem or to perform a specific task. Each step of an algorithm is precise, unambiguous, and executable , ensuring that the problem is solved correctly. According to computer scientist Niklaus Wirth , Program = Algorithm + Data , which indicates that an algorithm forms the logical foundation of any computer program. A well-designed algorithm must always terminate after a finite number of steps and produce at least one output for the given input. Algorithms are language-independent , meaning they can be implemented using any programming language. Algorithms are essential because they help in systematic problem-solving , improve clarity of logic , reduce errors, and make program development easier and more efficient. Key Features of an Algorithm: Finite – Ends after a limited numb...

2.8 TOKENS

Image
                                          Programming in C     TOKENS IN C Tokens are the basic lexical building blocks of a C program. They are the smallest individual units of a program that are recognized and understood by the compiler . Characters written in a source program are grouped into tokens according to the rules of the C language. The compiler performs lexical analysis , during which it checks whether the tokens form legal strings as per the syntax rules of C. C language has five classes of tokens : Identifiers Keywords (Reserved words) Operators Separators Constants Example Showing Tokens if (x < 5 ) x = x + 2 ; else x = x + 10 ; Tokens Generated Keywords : if , else Identifiers : x Constants : 5 , 2 , 10 Operators : < , = , + Separators : ; , ( , ) 1 Identifier An identifier is...

2.9 TYPE CONVERSION IN C

Image
                                        Programming in C     TYPE CONVERSION IN C Though the C compiler performs automatic type conversions , a programmer must clearly understand how these conversions occur in order to correctly evaluate expressions and avoid loss of data or precision . Type conversion in C refers to the process of converting one data type into another , either automatically by the compiler or explicitly by the programmer . Type Conversion in C  Type Conversion in Expressions Conversion by Assignment  Casting Arithmetic Expressions   1 Type Conversion in Expressions When a C expression is evaluated, the result has a specific data type . If all operands are of the same data type , the result is also of that type. Example: If x and y are both of type int , then x + y is also of type int . Expressions with Mixed Data Ty...