Break Statement

Break Statement Is Used To Break The Execution Of The Loop(while,dowhile,for) And Switch Case. #include<stdio.h> #include<conio.h> voidmain() { int i; clrscr(); for(i=1;i<=10;i++) { printf("%d\n",i); if(i==5) { break; } } getch(); } Result 1 2 3 4 5 Break Break Statement With Inner Loop #include<stdio.h> #include<conio.h> voidmain() { int i,j; clrscr(); for(i=1;i<=3;j++) { printf("%d\t%d\n",i,j); if(i==2&&j==2) { break; } } } getch(); } Result 1     1 2     2 Break    

Read More

Day 9: Looping Statements

Looping Statements In C Are Used To Execute A Block Of Code Or A Part Of The Program Several Times. (Or) It Iterates A Code (or) A Group Of Code Many Times.   Advantages It Saves The Code It Helps The Traverse The Elements Of Array.   Types Of Loops There Are Three Types Of Loops In C

Read More

Day 8: Switch Statement

Switch Statement Is Used To Execute The Code From Multiple Conditions In C Language.   Note The Switch Expression Must Be Of Integer Or Character Type. The Case Value Must Be Of Integer Or Character Constant. The Case Value Can Be Used In Switch Case. The Break Statement In Switch Case Is

Read More

Day 7: Control Statement

Control Statement s  Are Used To Control The Flow Of Execution. There Are Three Types Of Control Statements In C Language. If Statement If Else If Else Ladder 1.If Statement - It Is Used To Perform Operations Based On The Condition. Syntax If(condition) { //code to be executed; } Example  Write A Program To Print  Given Number Is Even

Read More

Day 6: Escape Sequence

An Escape Sequence In C Language Is Used To A Sequence Of Characters That Doesn't Represent Itself When Divided Inside String Literal. It Is Composed Of Two Or More Characters Starting With \ Program  Program By Using Escape Sequences. #include<stdio.h> #include<conio.h> voidmain() { clrscr(); printf("\n welcome \n\t to \n \n promac \n\t\t computers"); getch(); } Result    

Read More

Day 5: Operators In C

Operators In C - An Operator Is Simply A Symbol That Is Used To Perform Operation. Operators Are The Symbols Used With Variables Or Operands To Perform A Specific Task.   Operators Precedence Of Priority If The Expression Has Two Operands, The Operator With Highest Priority Executes First. If The Expression Has Two Operands

Read More

Day 4: Data Types And Variables In C

Data Types And Variables In C - A Data Type Specifies The Type Of Data That A Variable Can Store Such As Integer, Float, Character, Long Integer Etc. A Variable Is A Name Of Memory Location. It Is Used To Store Data. Its Values Can Be Change And It Can

Read More

Day 3: C Program Flow

The C Program Flow s Many Steps In Execution. C Program(Source Code) Is Sent To Preprocessor First. The Preprocessor Is Responsible To Convert Directives Into Their Respective Values. The Preprocessor Generates An Expanded Source Code. Expanded Source Code Is Sent To Compiler Which Compiles The Code And Converts It Into Assembly Code.

Read More

Day 2: Addition Program In C

Addition Program In C Or Sum Of Two Numbers,This Is A 'C' Program For Sum Of Two Numbers #include<stdio.h> #include<conio.h> void main() { int a,b; clrcsr(); printf("Enter Any Two Integers : "); scanf("%d%d",&a,&b); printf("sum of %d and %d is %d",a,b,(a+b)); getch(); }   Output Enter Any Two Integers: a=5 b=6 The sum of 5 and 6 is 11   scanf("%d%d",&a,&b); Statement Reads Integer Values From The Console And Stores

Read More

Day 1: C Programming Language

C Programming Language Is Considered As The Base For Other Programming Languages, That Is Why The Reason C Programming Language Is Called As " Mother Language ". C Programming Language Is Also Known As System Programming Language Procedure Oriented Programming Language Structural Programming Language Mid-Level Programming Language   Features Of C Language  C Programming

Read More