SlideShare a Scribd company logo
1 of 16
β€˜C’ LANGUAGE




            POP                                     OOP

 ( Procedure Oriented program )           ( Object Oriented Program )



                            FUNCTION



 BUILT IN FUNCTION                    USER DEFINE FUNCTION


1) 1959 – ALGOL ( Algoritham Oriented Language )

2) 1962 – BCPL ( Basic Common Program language )

3) 1972 – Dennis Ritchi ( Bell Laboratory ) [ USA ] β€˜β€˜c’’


                    Turbo C2 – β€˜c’
                    Turbo C3 – β€˜c’ & β€˜C ++’
                      (Tc300)
                        (Tc)

C:Windows>cd.. Enter
C:>Cdtc Enter
C:Tc>CdBin Enter
C:TcBin>Tc Enter

                         Structure of β€˜C’ Program

# include<stdio.h>
# include<conio.h>
  Void main ( )
{
Clrscr ( );
Printf (β€œ Message 1”);


CREATE BY [ A.P ]                    1
β€˜C’ LANGUAGE


Printf (β€œ Message 2”); } ( The lines up & down Type β€œn )
}

   1) Compile – Alt + F9
   2) Run Program – Ctrl + F9
   3) Display Final Output Alt + F5

                             Data Types

   1) Integer – Number without Decimal
                Range- ( -31768 to +31767 )
                Format- ( % d )
                Memory size- 2 Byte
                Example- int a,b

   2) Float – Decimal Values
              Range- 10-38 to 1038
              Memory size- 4 byte
              Format- ( % f )
              Example- float x,y

   3) Double- Range-10-38 to 10308
              Memory size- 8 bytes
              Format- ( % l d )
              Example- double a,b

   4) Long Double – Memory size- 10 byte
                    Format- ( %L )
                    Example- x,y

   5) Character- Memory size- 1 byte
                 Format- ( % c ) For one Letter
                         ( % s ) For strength

                           Program 1

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {

CREATE BY [ A.P ]                     2
β€˜C’ LANGUAGE


   int num1,num2,c;
   clrscr();
   num1=20;
   num2=2;
   c=num1+num2;
   printf("nTotal=%d",c);
   c=num1-num2;
   printf("nSub=%d",c);
   c=num1*num2;
   printf("nMul=%d",c);
   c=num1/num2;
   printf("nDiv=%d",c);
   getch();
   }

                                Program 2

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   int num1,num2,c;
   printf("nEnter 1st no.");
   scanf("%d",&num1);
   printf("nEnter 2nd no.");
   scanf("%d",&num2);
   c=num1+num2;
   printf("nTotal=%d",c);
   getch();
   }

                                Operator

   1) Arithmetic operator - +, -, *, / , %
                            A = 100 % 6
                            Output A = 4

   2) Relational Operator - < - Less than
                            > - Greter than
                            < = = - Less than equal to

CREATE BY [ A.P ]                      3
β€˜C’ LANGUAGE


                             < = = - Greter than equal to
                             = = - Equal to
                             ! = - Not equal to

   3) Logical operator – 1) &&- And
                         2) | | - Or
                         3) ! - Not operator

   4) Unary operator – 1) + + - Inerement operator
                       2) - - - Decrement operator

   5) Assignment operator – ( = )
                            A = A+5 – A + = 5
                            A = A-3 - A - = 3
                            A = A*2 - A * = 2

   6) Size of operator – Long double x;
                         Int a;
                         A = size of ( x );

                             Program 3

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int h,e,m,tot;
   float per;
   clrscr();
   printf("nEnter marks of 3 subjects:");
   scanf("%d%d%d",&h,&e,&m);
   tot=h+e+m;
   per=((float)tot/300)*100;
   printf("nTotal=%d",tot);
   printf("nper=%f",per);
   if(per>60)
   printf("nFrist");
   else if(per>45&&per<60)
   printf("nSecond");
   else if (per>=36&&per<45)

CREATE BY [ A.P ]                      4
β€˜C’ LANGUAGE


   printf("nThird");
   else
   printf("nFail");
   getch();
   }

                               Program 4

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   int a,b,c;
   clrscr();
   printf("nEnter 3 Numbers:");
   scanf("%d%d%d",&a,&b,&c);
   if (a>b&&a>c)
   printf("nA=%d",a);
   else if (b>a&&b>c)
   printf("nB=%d",b);
   else
   printf("nC=%d",c);
   getch();
   }

                               Program 5

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   char ch;
   clrscr();
   printf("nEnter one Letter:");
   scanf("n%c",&ch);
   if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
   printf("nLetter is vowel");
   else
   printf("nEnter is not vowel");
   getch();

CREATE BY [ A.P ]                       5
β€˜C’ LANGUAGE


   }
                            Program 6

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   int year;
   clrscr();
   printf("nEnter Year");
   scanf("%d",&year);
   if(year%4==0)
   printf("nLeap Year");
   else
   printf("nNot leap Year");
   getch();
   }

                            Program 7

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   int a;
   clrscr();
   a=1;
   while(a<=10)
   {
   printf("n%d",a);
   a++;
   }
   getch();
   }

                            Program 8

   #include<stdio.h>
   #include<conio.h>
   void main ()

CREATE BY [ A.P ]                  6
β€˜C’ LANGUAGE


   {
   int a,sum=0;
   clrscr();
   a=1;
   while(a<=10)
   {
   printf("n%d",a);
   sum=sum+a;
   a++;
   }
   printf("nTotal=%d",sum);
   getch();
   }

                           Program 9

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a;
   clrscr();
   a=10;
   while(a>=1)
   {
   printf("n%d",a);
   a--;
   }
   getch();
   }

                           Program 10

   #include<stdio.h>
   #include<conio.h>
   void main ()
   {
   int a;
   clrscr();
   a=1000;

CREATE BY [ A.P ]                 7
β€˜C’ LANGUAGE


   while(a>=1)
   {
   printf("n%d",a);
   a=a/2;
   }
   getch();
   }

                           Program 11

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a,b;
   clrscr();
   a=1;
   while(a<=10)
   {
   b=a*a;
   printf("n%d",b);
   a++;
   }
   getch();
   }

                           Program 12

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a,b,c;
   clrscr();
   printf("nEnter Number:");
   scanf("%d",&a);
   b=1;
   while(b<=10)
   {
   c=a*b;

CREATE BY [ A.P ]                 8
β€˜C’ LANGUAGE


   printf("n%d",c);
   b++;
   }
   getch();
   }

                            Program 13

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a,b,x,i;
   clrscr();
   a=0;
   b=1;
   printf("n%d",a);
   printf("n%d",b);
   i=1;
   while(i<=10)
   {
   x=a+b;
   printf("n%d",x);
   a=b;
   b=x;
   i++;
   }
   getch();
   }

                            Program 14

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a,b,even=0,odd=0;
   clrscr();
   a=1;
   while(a<=25)

CREATE BY [ A.P ]                  9
β€˜C’ LANGUAGE


   {
   printf("n%d",a);
   b=a%2;
   if(b==0)
   even=even+a;
   else
   odd=odd+a;
   a++;
   }
   printf("nEven Total=%d",even);
   printf("nOdd Total=%d",odd);
   getch();
   }

                            Program 15

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   int a,fact;
   clrscr();
   printf("nEnter no.");
   scanf("%d",&a);
   fact=1;
   while(a>0)
   {
   fact=fact*a;
   a--;
   }
   printf("nFactorial No:=%d",fact);
   getch();
   }

                            Program 16

   #include<stdio.h>
   #include<conio.h>
    void main()
    {

CREATE BY [ A.P ]                    10
β€˜C’ LANGUAGE


   int a;
   clrscr();
   a=9+5*4-3*4/2;
   printf("%d",a);
   getch();
   }

                        Program 17

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a;
    clrscr();
    a=-9+4;
    printf("%d",a);
    getch();
    }

                        Program 18

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a=5,b=7,c;
    clrscr();
    c=a<b;
    printf("%d",c);
    getch();
    }

                        Program 19

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a=5;

CREATE BY [ A.P ]              11
β€˜C’ LANGUAGE


   clrscr();
   while(a)
   {
   printf("n Ram");
   a--;
   }
   getch();
   }

                           Program 20

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a,b,c;
    clrscr();
    printf("nEnter Two Number:");
    scanf("%d%d",&a,&b);
    printf("1-Add,2-Sub,3-Mul,4-Div");
    printf("nEnter Choice:");
    scanf("%d",&c);
    switch(c)
    {
    case 1:
    printf("nTotal=%d",a+b);
    break;
    case 2:
    printf("nSub=%d",a-b);
    break;
    case 3:
    printf("nMul=%d",a*b);
    break;
    case 4:
    printf("nDiv=%d",a/b);
    break;
    default:
    printf("nInvalid Number");
    }
    getch();

CREATE BY [ A.P ]                  12
β€˜C’ LANGUAGE


   }
                          Program 21

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a;
    clrscr();
    a=1;
    do
    {
    printf("n%d",a);
    a++;
    }
    while(a<=10);
    getch();
    }

                          Program 22

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a;
    clrscr();
    for(a=1;a<=10;a++)
    {
    printf("n%d",a);
    }
    getch();
    }

                          Program 23

   #include<stdio.h>
   #include<conio.h>
    void main()
    {

CREATE BY [ A.P ]                13
β€˜C’ LANGUAGE


   int a,b,c;
   clrscr();
   printf("nEnter Number:");
   scanf("%d",&a);
   for (b=1;b<=10;b++)
   {
   c=a*b;
   printf("n%d",c);
   }
   getch();
   }

                              Program 24

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int a,b;
    clrscr();
    for(a=1;a<5;a++)
    {
    for(b=1;b<a;b++)
    {
    printf("%d",b);
    }
    printf("n");
    }
    getch();
    }

                              Program 25

   #include<stdio.h>
   #include<conio.h>
   void main()
   {
   char name[15];
   clrscr();
   printf("nEnter Name:");

CREATE BY [ A.P ]                    14
β€˜C’ LANGUAGE


   gets(name);
   printf("nyour name=%s",name);
   getch();
   }

                              Program 26

   #include<stdio.h>
   #include<conio.h>
    void main()
    {
    int x[5],a;
    clrscr();
    for(a=0;a<=4;a++)
    {
    printf("nEnter No:");
    scanf("%d",&x[a]);
    }
    for(a=0;a<4;a++)
    {
    printf("n%d",x[a]);
    }
    getch();
    }




CREATE BY [ A.P ]                    15
β€˜C’ LANGUAGE




CREATE BY [ A.P ]          16

More Related Content

What's hot

Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language CourseVivek chan
Β 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
Β 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programminggajendra singh
Β 
C program
C programC program
C programAJAL A J
Β 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comM-TEC Computer Education
Β 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)Dushmanta Nath
Β 
Fundamental of C Programming Language and Basic Input/Output Function
  Fundamental of C Programming Language and Basic Input/Output Function  Fundamental of C Programming Language and Basic Input/Output Function
Fundamental of C Programming Language and Basic Input/Output Functionimtiazalijoono
Β 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for EngineeringVincenzo De Florio
Β 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
Β 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
Β 
Tutorial on c language programming
Tutorial on c language programmingTutorial on c language programming
Tutorial on c language programmingSudheer Kiran
Β 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1Vikram Nandini
Β 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic conceptsAbhinav Vatsa
Β 
Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xiiSyed Zaid Irshad
Β 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02Wingston
Β 
Introduction to c language
Introduction to c languageIntroduction to c language
Introduction to c languageRavindraSalunke3
Β 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRutvik Pensionwar
Β 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 FocJAYA
Β 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language samt7
Β 

What's hot (20)

Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
Β 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
Β 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Β 
C program
C programC program
C program
Β 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
Β 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
Β 
Fundamental of C Programming Language and Basic Input/Output Function
  Fundamental of C Programming Language and Basic Input/Output Function  Fundamental of C Programming Language and Basic Input/Output Function
Fundamental of C Programming Language and Basic Input/Output Function
Β 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
Β 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
Β 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
Β 
Tutorial on c language programming
Tutorial on c language programmingTutorial on c language programming
Tutorial on c language programming
Β 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
Β 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
Β 
Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xii
Β 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
Β 
Introduction to c language
Introduction to c languageIntroduction to c language
Introduction to c language
Β 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
Β 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
Β 
Function C programming
Function C programmingFunction C programming
Function C programming
Β 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
Β 

Viewers also liked

best notes in c language
best notes in c languagebest notes in c language
best notes in c languageIndia
Β 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit orderMalikireddy Bramhananda Reddy
Β 
Arrays In C Language
Arrays In C LanguageArrays In C Language
Arrays In C LanguageSurbhi Yadav
Β 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C languageShubham Sharma
Β 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c languageRai University
Β 
physics-of-vibration-and-waves-solutions-pain
 physics-of-vibration-and-waves-solutions-pain physics-of-vibration-and-waves-solutions-pain
physics-of-vibration-and-waves-solutions-painmiranteogbonna
Β 
Array in c language
Array in c languageArray in c language
Array in c languagehome
Β 

Viewers also liked (10)

best notes in c language
best notes in c languagebest notes in c language
best notes in c language
Β 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
Β 
Handwritten Notes (c)
Handwritten Notes (c)Handwritten Notes (c)
Handwritten Notes (c)
Β 
Arrays In C Language
Arrays In C LanguageArrays In C Language
Arrays In C Language
Β 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
Β 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
Β 
C Is Easy
C Is EasyC Is Easy
C Is Easy
Β 
physics-of-vibration-and-waves-solutions-pain
 physics-of-vibration-and-waves-solutions-pain physics-of-vibration-and-waves-solutions-pain
physics-of-vibration-and-waves-solutions-pain
Β 
Array in c language
Array in c languageArray in c language
Array in c language
Β 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
Β 

Similar to C Language Fundamentals

C basics
C basicsC basics
C basicsMSc CST
Β 
Simple C programs
Simple C programsSimple C programs
Simple C programsab11cs001
Β 
C Programming lab
C Programming labC Programming lab
C Programming labVikram Nandini
Β 
SaraPIC
SaraPICSaraPIC
SaraPICSara Sahu
Β 
Core programming in c
Core programming in cCore programming in c
Core programming in cRahul Pandit
Β 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solutionAzhar Javed
Β 
Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020vrgokila
Β 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given numberMainak Sasmal
Β 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given numberMainak Sasmal
Β 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSKavyaSharma65
Β 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
Β 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using CBilal Mirza
Β 

Similar to C Language Fundamentals (20)

C basics
C basicsC basics
C basics
Β 
C Programming
C ProgrammingC Programming
C Programming
Β 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
Β 
C
CC
C
Β 
Simple C programs
Simple C programsSimple C programs
Simple C programs
Β 
Hargun
HargunHargun
Hargun
Β 
C Programming lab
C Programming labC Programming lab
C Programming lab
Β 
SaraPIC
SaraPICSaraPIC
SaraPIC
Β 
C file
C fileC file
C file
Β 
Core programming in c
Core programming in cCore programming in c
Core programming in c
Β 
C Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossainC Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossain
Β 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Β 
Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020
Β 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Β 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Β 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
Β 
C lab programs
C lab programsC lab programs
C lab programs
Β 
C lab programs
C lab programsC lab programs
C lab programs
Β 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
Β 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using C
Β 

Recently uploaded

Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...shivangimorya083
Β 
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESUNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESDineshKumar4165
Β 
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130 Available With Room
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130  Available With RoomVIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130  Available With Room
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130 Available With Roomdivyansh0kumar0
Β 
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚Hot Call Girls In Sector 58 (Noida)
Β 
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERUNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERDineshKumar4165
Β 
Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...D&V Business Consulting
Β 
Innovating Manufacturing with CNC Technology
Innovating Manufacturing with CNC TechnologyInnovating Manufacturing with CNC Technology
Innovating Manufacturing with CNC Technologyquickpartslimitlessm
Β 
call girls in G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in  G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in  G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxUNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxDineshKumar4165
Β 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Niya Khan
Β 
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCRsoniya singh
Β 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxDineshKumar4165
Β 
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 person
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 personDelhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 person
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 personshivangimorya083
Β 
Beautiful Vip Call Girls Punjabi Bagh 9711199012 Call /Whatsapps
Beautiful Vip  Call Girls Punjabi Bagh 9711199012 Call /WhatsappsBeautiful Vip  Call Girls Punjabi Bagh 9711199012 Call /Whatsapps
Beautiful Vip Call Girls Punjabi Bagh 9711199012 Call /Whatsappssapnasaifi408
Β 
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryCall me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryPooja Nehwal
Β 
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...Garima Khatri
Β 
BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024AHOhOops1
Β 
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€mkfnjj
Β 
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€hnfusn
Β 

Recently uploaded (20)

Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Β 
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESUNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
Β 
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130 Available With Room
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130  Available With RoomVIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130  Available With Room
VIP Kolkata Call Girl Kasba πŸ‘‰ 8250192130 Available With Room
Β 
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚
κ§ΰΌ’β˜¬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncrβ˜¬ΰΌ’κ§‚
Β 
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERUNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
Β 
Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...
Β 
Innovating Manufacturing with CNC Technology
Innovating Manufacturing with CNC TechnologyInnovating Manufacturing with CNC Technology
Innovating Manufacturing with CNC Technology
Β 
call girls in G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in  G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in  G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in G.T.B. Nagar (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxUNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
Β 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Β 
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR
(8264348440) πŸ” Call Girls In Shaheen Bagh πŸ” Delhi NCR
Β 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
Β 
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 person
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 personDelhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 person
Delhi Call Girls Saket 9711199171 β˜Žβœ”πŸ‘Œβœ” Full night Service for more than 1 person
Β 
Beautiful Vip Call Girls Punjabi Bagh 9711199012 Call /Whatsapps
Beautiful Vip  Call Girls Punjabi Bagh 9711199012 Call /WhatsappsBeautiful Vip  Call Girls Punjabi Bagh 9711199012 Call /Whatsapps
Beautiful Vip Call Girls Punjabi Bagh 9711199012 Call /Whatsapps
Β 
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryCall me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Β 
Call Girls in Shri Niwas Puri Delhi πŸ’―Call Us πŸ”9953056974πŸ”
Call Girls in  Shri Niwas Puri  Delhi πŸ’―Call Us πŸ”9953056974πŸ”Call Girls in  Shri Niwas Puri  Delhi πŸ’―Call Us πŸ”9953056974πŸ”
Call Girls in Shri Niwas Puri Delhi πŸ’―Call Us πŸ”9953056974πŸ”
Β 
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
Β 
BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024
Β 
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€
εŠžη†εŸƒι»˜ι‡Œε€§ε­¦ζ―•δΈšθ―Emoryζ―•δΈšθ―εŽŸη‰ˆδΈ€ζ―”δΈ€
Β 
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€
ε¦‚δ½•εŠžη†(UQζ―•δΈšθ―δΉ¦οΌ‰ζ˜†ε£«ε…°ε€§ε­¦ζ―•δΈšθ―ζ―•δΈšθ―ζˆη»©ε•εŽŸη‰ˆδΈ€ζ―”δΈ€
Β 

C Language Fundamentals

  • 1. β€˜C’ LANGUAGE POP OOP ( Procedure Oriented program ) ( Object Oriented Program ) FUNCTION BUILT IN FUNCTION USER DEFINE FUNCTION 1) 1959 – ALGOL ( Algoritham Oriented Language ) 2) 1962 – BCPL ( Basic Common Program language ) 3) 1972 – Dennis Ritchi ( Bell Laboratory ) [ USA ] β€˜β€˜c’’ Turbo C2 – β€˜c’ Turbo C3 – β€˜c’ & β€˜C ++’ (Tc300) (Tc) C:Windows>cd.. Enter C:>Cdtc Enter C:Tc>CdBin Enter C:TcBin>Tc Enter Structure of β€˜C’ Program # include<stdio.h> # include<conio.h> Void main ( ) { Clrscr ( ); Printf (β€œ Message 1”); CREATE BY [ A.P ] 1
  • 2. β€˜C’ LANGUAGE Printf (β€œ Message 2”); } ( The lines up & down Type β€œn ) } 1) Compile – Alt + F9 2) Run Program – Ctrl + F9 3) Display Final Output Alt + F5 Data Types 1) Integer – Number without Decimal Range- ( -31768 to +31767 ) Format- ( % d ) Memory size- 2 Byte Example- int a,b 2) Float – Decimal Values Range- 10-38 to 1038 Memory size- 4 byte Format- ( % f ) Example- float x,y 3) Double- Range-10-38 to 10308 Memory size- 8 bytes Format- ( % l d ) Example- double a,b 4) Long Double – Memory size- 10 byte Format- ( %L ) Example- x,y 5) Character- Memory size- 1 byte Format- ( % c ) For one Letter ( % s ) For strength Program 1 #include<stdio.h> #include<conio.h> void main () { CREATE BY [ A.P ] 2
  • 3. β€˜C’ LANGUAGE int num1,num2,c; clrscr(); num1=20; num2=2; c=num1+num2; printf("nTotal=%d",c); c=num1-num2; printf("nSub=%d",c); c=num1*num2; printf("nMul=%d",c); c=num1/num2; printf("nDiv=%d",c); getch(); } Program 2 #include<stdio.h> #include<conio.h> void main () { int num1,num2,c; printf("nEnter 1st no."); scanf("%d",&num1); printf("nEnter 2nd no."); scanf("%d",&num2); c=num1+num2; printf("nTotal=%d",c); getch(); } Operator 1) Arithmetic operator - +, -, *, / , % A = 100 % 6 Output A = 4 2) Relational Operator - < - Less than > - Greter than < = = - Less than equal to CREATE BY [ A.P ] 3
  • 4. β€˜C’ LANGUAGE < = = - Greter than equal to = = - Equal to ! = - Not equal to 3) Logical operator – 1) &&- And 2) | | - Or 3) ! - Not operator 4) Unary operator – 1) + + - Inerement operator 2) - - - Decrement operator 5) Assignment operator – ( = ) A = A+5 – A + = 5 A = A-3 - A - = 3 A = A*2 - A * = 2 6) Size of operator – Long double x; Int a; A = size of ( x ); Program 3 #include<stdio.h> #include<conio.h> void main() { int h,e,m,tot; float per; clrscr(); printf("nEnter marks of 3 subjects:"); scanf("%d%d%d",&h,&e,&m); tot=h+e+m; per=((float)tot/300)*100; printf("nTotal=%d",tot); printf("nper=%f",per); if(per>60) printf("nFrist"); else if(per>45&&per<60) printf("nSecond"); else if (per>=36&&per<45) CREATE BY [ A.P ] 4
  • 5. β€˜C’ LANGUAGE printf("nThird"); else printf("nFail"); getch(); } Program 4 #include<stdio.h> #include<conio.h> void main () { int a,b,c; clrscr(); printf("nEnter 3 Numbers:"); scanf("%d%d%d",&a,&b,&c); if (a>b&&a>c) printf("nA=%d",a); else if (b>a&&b>c) printf("nB=%d",b); else printf("nC=%d",c); getch(); } Program 5 #include<stdio.h> #include<conio.h> void main () { char ch; clrscr(); printf("nEnter one Letter:"); scanf("n%c",&ch); if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u') printf("nLetter is vowel"); else printf("nEnter is not vowel"); getch(); CREATE BY [ A.P ] 5
  • 6. β€˜C’ LANGUAGE } Program 6 #include<stdio.h> #include<conio.h> void main () { int year; clrscr(); printf("nEnter Year"); scanf("%d",&year); if(year%4==0) printf("nLeap Year"); else printf("nNot leap Year"); getch(); } Program 7 #include<stdio.h> #include<conio.h> void main () { int a; clrscr(); a=1; while(a<=10) { printf("n%d",a); a++; } getch(); } Program 8 #include<stdio.h> #include<conio.h> void main () CREATE BY [ A.P ] 6
  • 7. β€˜C’ LANGUAGE { int a,sum=0; clrscr(); a=1; while(a<=10) { printf("n%d",a); sum=sum+a; a++; } printf("nTotal=%d",sum); getch(); } Program 9 #include<stdio.h> #include<conio.h> void main() { int a; clrscr(); a=10; while(a>=1) { printf("n%d",a); a--; } getch(); } Program 10 #include<stdio.h> #include<conio.h> void main () { int a; clrscr(); a=1000; CREATE BY [ A.P ] 7
  • 8. β€˜C’ LANGUAGE while(a>=1) { printf("n%d",a); a=a/2; } getch(); } Program 11 #include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); a=1; while(a<=10) { b=a*a; printf("n%d",b); a++; } getch(); } Program 12 #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("nEnter Number:"); scanf("%d",&a); b=1; while(b<=10) { c=a*b; CREATE BY [ A.P ] 8
  • 9. β€˜C’ LANGUAGE printf("n%d",c); b++; } getch(); } Program 13 #include<stdio.h> #include<conio.h> void main() { int a,b,x,i; clrscr(); a=0; b=1; printf("n%d",a); printf("n%d",b); i=1; while(i<=10) { x=a+b; printf("n%d",x); a=b; b=x; i++; } getch(); } Program 14 #include<stdio.h> #include<conio.h> void main() { int a,b,even=0,odd=0; clrscr(); a=1; while(a<=25) CREATE BY [ A.P ] 9
  • 10. β€˜C’ LANGUAGE { printf("n%d",a); b=a%2; if(b==0) even=even+a; else odd=odd+a; a++; } printf("nEven Total=%d",even); printf("nOdd Total=%d",odd); getch(); } Program 15 #include<stdio.h> #include<conio.h> void main() { int a,fact; clrscr(); printf("nEnter no."); scanf("%d",&a); fact=1; while(a>0) { fact=fact*a; a--; } printf("nFactorial No:=%d",fact); getch(); } Program 16 #include<stdio.h> #include<conio.h> void main() { CREATE BY [ A.P ] 10
  • 11. β€˜C’ LANGUAGE int a; clrscr(); a=9+5*4-3*4/2; printf("%d",a); getch(); } Program 17 #include<stdio.h> #include<conio.h> void main() { int a; clrscr(); a=-9+4; printf("%d",a); getch(); } Program 18 #include<stdio.h> #include<conio.h> void main() { int a=5,b=7,c; clrscr(); c=a<b; printf("%d",c); getch(); } Program 19 #include<stdio.h> #include<conio.h> void main() { int a=5; CREATE BY [ A.P ] 11
  • 12. β€˜C’ LANGUAGE clrscr(); while(a) { printf("n Ram"); a--; } getch(); } Program 20 #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("nEnter Two Number:"); scanf("%d%d",&a,&b); printf("1-Add,2-Sub,3-Mul,4-Div"); printf("nEnter Choice:"); scanf("%d",&c); switch(c) { case 1: printf("nTotal=%d",a+b); break; case 2: printf("nSub=%d",a-b); break; case 3: printf("nMul=%d",a*b); break; case 4: printf("nDiv=%d",a/b); break; default: printf("nInvalid Number"); } getch(); CREATE BY [ A.P ] 12
  • 13. β€˜C’ LANGUAGE } Program 21 #include<stdio.h> #include<conio.h> void main() { int a; clrscr(); a=1; do { printf("n%d",a); a++; } while(a<=10); getch(); } Program 22 #include<stdio.h> #include<conio.h> void main() { int a; clrscr(); for(a=1;a<=10;a++) { printf("n%d",a); } getch(); } Program 23 #include<stdio.h> #include<conio.h> void main() { CREATE BY [ A.P ] 13
  • 14. β€˜C’ LANGUAGE int a,b,c; clrscr(); printf("nEnter Number:"); scanf("%d",&a); for (b=1;b<=10;b++) { c=a*b; printf("n%d",c); } getch(); } Program 24 #include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); for(a=1;a<5;a++) { for(b=1;b<a;b++) { printf("%d",b); } printf("n"); } getch(); } Program 25 #include<stdio.h> #include<conio.h> void main() { char name[15]; clrscr(); printf("nEnter Name:"); CREATE BY [ A.P ] 14
  • 15. β€˜C’ LANGUAGE gets(name); printf("nyour name=%s",name); getch(); } Program 26 #include<stdio.h> #include<conio.h> void main() { int x[5],a; clrscr(); for(a=0;a<=4;a++) { printf("nEnter No:"); scanf("%d",&x[a]); } for(a=0;a<4;a++) { printf("n%d",x[a]); } getch(); } CREATE BY [ A.P ] 15