Programming with C – Arrays- Lecture5

Array is a linear list of homogeneous elements, stored at successive memory locations in consecutive order.

C programming language provides a data structure called the array, that can store a fixed size sequential collection of elements of same data type.

An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. For example, if your class strength is 50 then your roll numbers are rollnumber1, rollnumber2, rollnumber3 …… rollnumber50.

Instead of declaring individual variables, such as rollnumber1, …, and rollnumber50, you declare one array variable such as rollnumb.

Continue reading “Programming with C – Arrays- Lecture5”

Programming With C : Nested Loops and Jumping Statements- Lecture4

As we discussed in our last chapter

Loops, like if-else statements, can be nested, one within another.

While, the inner and outer loops need not be generated by the same type of control structure.

It is essential,  that one loop be completely embedded within the other  – there can be no overlap.

Therefore, Each loop must be controlled by different index.

Moreover, nested control structure can involve both loops and if-else statement.

Thus, a loop can be nested within an if-else statement, and an if-else statement can be nested within a loop.

Hence, the nested structure may be complex as necessary, as determined by the program logic.

Continue reading “Programming With C : Nested Loops and Jumping Statements- Lecture4”

Programming with C – “Control Statements – Loop”- Lecture 3

Suppose we want to display hello on output screen five times in five different lines.

We might think of writing either five printf statements or one printf statement consisting of constant “hello\n” five times.

What if we want to display hello 500 times?

Should we write 500 printf statement or equivalent ?

Obviously not.

It means that we need some programming facility to repeat certain works. Such facility in Programming Languages is available in the form Looping Statements.

Continue reading “Programming with C – “Control Statements – Loop”- Lecture 3″

Programming with C – Input/Outputs & Decision Making-Lecture 2

Structure of C Program

# include < header file>  // # is pre-processor directive

 #define x  5  //symbolic constant

int a, b;   //global variable declaration

int fxn();  // function declaration

main() //main function


int i,j,k;     // local variable declaration

Input statements;


Output Statements;


Continue reading “Programming with C – Input/Outputs & Decision Making-Lecture 2”

Programming with C – Basics – Lecture 1

  • Language & Programming Language
  • About C
  • Character Set, Identifiers & Statements
  • Data Types
  • Operators
  • Input Output Functions
  • Basic Programming Examples

What is Language

Language is a way of Communication Between Two like Hindi, English, Punjabi, Marathi, Tamil etc.

If we want to communicate other then our own languages then we can communicate in either of two ways

– Either Learn

– Use Translator

Continue reading “Programming with C – Basics – Lecture 1”