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;

Process;

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”