SlideShare a Scribd company logo
C Programming - Structures

Organized By: Vinay Arora
               Assistant Professor, CSED
               Thapar University, Patiala
Program - 1
  #include<stdio.h>                                   getch();
  #include<conio.h>                                    }
  void main()
   {
    char name[3];
    float price[3],i;
    clrscr();

   printf("Enter names, price of 3 booksn");

   for(i=0;i<=2;i++)
    scanf("n%c %f",&name[i],&price[i]);

   printf("nAnd this is what you have enteredn");
   for(i=0;i<=2;i++)
    printf("%c %fn",name[i],price[i]);

                                   Vinay Arora
                                      CSED
Program – 1 (output)




                Vinay Arora
                   CSED
Program - 2
  #include<stdio.h>                   printf("nAnd this is what you have enteredn");
  #include<conio.h>                   printf("n%c %f",b1.name,b1.price);
  void main()                         printf("n%c %f",b2.name,b2.price);
   {                                  printf("n%c %f",b3.name,b3.price);
    struct book
     {                                getch();
      char name;                     }
      float price;
     };
    struct book b1,b2,b3;
    clrscr();

   printf("Enter names, price of 3 booksn");
   scanf("n%c %f",&b1.name,&b1.price);
   scanf("n%c %f",&b2.name,&b2.price);
   scanf("n%c %f",&b3.name,&b3.price);

                                      Vinay Arora
                                         CSED
Program – 2 (output)




                Vinay Arora
                   CSED
Thnx…



  Vinay Arora
     CSED

More Related Content

What's hot

C programming array & shorting
C  programming array & shortingC  programming array & shorting
C programming array & shorting
argusacademy
 
Cpds lab
Cpds labCpds lab
Double linked list
Double linked listDouble linked list
Double linked list
raviahuja11
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
RAJWANT KAUR
 
4. chapter iii
4. chapter iii4. chapter iii
4. chapter iii
Chhom Karath
 
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
Sazzad Hossain, ITP, MBA, CSCA™
 
c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
Sushil Mishra
 
Lecture 1 string functions
Lecture 1  string functionsLecture 1  string functions
Lecture 1 string functions
Awinash Goswami
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
Chhom Karath
 
C basics
C basicsC basics
C basicsMSc CST
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
sandeep kumbhkar
 
ADA FILE
ADA FILEADA FILE
ADA FILE
Gaurav Singh
 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using C
Bilal Mirza
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
Kandarp Tiwari
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซีkramsri
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
Rahul Chugh
 
Arrays
ArraysArrays
ภาษาซี
ภาษาซีภาษาซี
ภาษาซีkramsri
 
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
vrgokila
 

What's hot (20)

C programming array & shorting
C  programming array & shortingC  programming array & shorting
C programming array & shorting
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
Double linked list
Double linked listDouble linked list
Double linked list
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
4. chapter iii
4. chapter iii4. chapter iii
4. chapter iii
 
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
 
c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
 
Lecture 1 string functions
Lecture 1  string functionsLecture 1  string functions
Lecture 1 string functions
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
 
C basics
C basicsC basics
C basics
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using C
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Arrays
ArraysArrays
Arrays
 
programs
programsprograms
programs
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
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
 

Viewers also liked

C Tutorial
C TutorialC Tutorial
C Tutorial
biochelo
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
hossam nassar
 
C Prog - Functions
C Prog - FunctionsC Prog - Functions
C Prog - Functionsvinay arora
 
C Prog. - Data Types, Variables and Constants
C Prog. - Data Types, Variables and ConstantsC Prog. - Data Types, Variables and Constants
C Prog. - Data Types, Variables and Constantsvinay arora
 
C Prog. - ASCII Values, Break, Continue
C Prog. -  ASCII Values, Break, ContinueC Prog. -  ASCII Values, Break, Continue
C Prog. - ASCII Values, Break, Continuevinay arora
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointersvinay arora
 
C Prog. - Decision & Loop Controls
C Prog. - Decision & Loop ControlsC Prog. - Decision & Loop Controls
C Prog. - Decision & Loop Controlsvinay arora
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphicsvinay arora
 
Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
vinay arora
 
security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql database
gourav kottawar
 
C Prog. - Introduction to Hardware, Software, Algorithm & Flowchart
C Prog. - Introduction to Hardware, Software, Algorithm & FlowchartC Prog. - Introduction to Hardware, Software, Algorithm & Flowchart
C Prog. - Introduction to Hardware, Software, Algorithm & Flowchartvinay arora
 
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Beat Signer
 
Overview of security in DBMS
Overview of security in DBMSOverview of security in DBMS
Overview of security in DBMS
Vatroslav Mileusnić
 
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
Beat Signer
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
SARITHA REDDY
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
iimjobs and hirist
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
Abhishek Dwivedi
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Beat Signer
 

Viewers also liked (20)

C Tutorial
C TutorialC Tutorial
C Tutorial
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
C Prog - Functions
C Prog - FunctionsC Prog - Functions
C Prog - Functions
 
C Prog. - Data Types, Variables and Constants
C Prog. - Data Types, Variables and ConstantsC Prog. - Data Types, Variables and Constants
C Prog. - Data Types, Variables and Constants
 
C Prog. - ASCII Values, Break, Continue
C Prog. -  ASCII Values, Break, ContinueC Prog. -  ASCII Values, Break, Continue
C Prog. - ASCII Values, Break, Continue
 
C programming slide-6
C programming slide-6C programming slide-6
C programming slide-6
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointers
 
C Prog. - Decision & Loop Controls
C Prog. - Decision & Loop ControlsC Prog. - Decision & Loop Controls
C Prog. - Decision & Loop Controls
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphics
 
Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql database
 
C Prog. - Introduction to Hardware, Software, Algorithm & Flowchart
C Prog. - Introduction to Hardware, Software, Algorithm & FlowchartC Prog. - Introduction to Hardware, Software, Algorithm & Flowchart
C Prog. - Introduction to Hardware, Software, Algorithm & Flowchart
 
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
 
Overview of security in DBMS
Overview of security in DBMSOverview of security in DBMS
Overview of security in DBMS
 
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
Course Review - Lecture 12 - Next Generation User Interfaces (4018166FNR)
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 

Similar to C Prog. - Structures

C Programming
C ProgrammingC Programming
C Programming
Sumant Diwakar
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
Mahmud Hasan Tanvir
 
C lab
C labC lab
C Programming lab
C Programming labC Programming lab
C Programming lab
Vikram Nandini
 
Data structure new lab manual
Data structure  new lab manualData structure  new lab manual
Data structure new lab manualSANTOSH RATH
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++
Ankit Kumar
 
C Structure and Union in C
C Structure and Union in CC Structure and Union in C
C programming function
C  programming functionC  programming function
C programming function
argusacademy
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
Koshy Geoji
 
C-programs
C-programsC-programs
C-programs
SSGMCE SHEGAON
 
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐานการเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐานHamHam' Kc
 
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™Boom Baphomet
 
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)HamHam' Kc
 
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)Seenton Pukjira
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
Janani Satheshkumar
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
PRATHAMESH DESHPANDE
 
Circular queue
Circular queueCircular queue
Circular queue
ShobhaHiremath8
 
C file
C fileC file
C programming
C programmingC programming
c programs.pptx
c programs.pptxc programs.pptx
c programs.pptx
LavanyaDiet1
 

Similar to C Prog. - Structures (20)

C Programming
C ProgrammingC Programming
C Programming
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
 
C lab
C labC lab
C lab
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
Data structure new lab manual
Data structure  new lab manualData structure  new lab manual
Data structure new lab manual
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++
 
C Structure and Union in C
C Structure and Union in CC Structure and Union in C
C Structure and Union in C
 
C programming function
C  programming functionC  programming function
C programming function
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
C-programs
C-programsC-programs
C-programs
 
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐานการเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
 
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™
เธเธฒเธฃเน€เธ‚ เธขเธ™เธ„เธณเธช _เธ‡เธ„เธงเธšเธ„_เธกเธ‚__เธ™เธž__เธ™เธเธฒเธ™
 
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
 
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 
Circular queue
Circular queueCircular queue
Circular queue
 
C file
C fileC file
C file
 
C programming
C programmingC programming
C programming
 
c programs.pptx
c programs.pptxc programs.pptx
c programs.pptx
 

More from vinay arora

Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)
vinay arora
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
vinay arora
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)
vinay arora
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)
vinay arora
 
6 java - loop
6  java - loop6  java - loop
6 java - loop
vinay arora
 
4 java - decision
4  java - decision4  java - decision
4 java - decision
vinay arora
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
vinay arora
 
2 java - operators
2  java - operators2  java - operators
2 java - operators
vinay arora
 
1 java - data type
1  java - data type1  java - data type
1 java - data type
vinay arora
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
vinay arora
 
Uta005 lecture1
Uta005 lecture1Uta005 lecture1
Uta005 lecture1
vinay arora
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
vinay arora
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protectionvinay arora
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronizationvinay arora
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitivesvinay arora
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devicesvinay arora
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devicesvinay arora
 
A&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLA&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLvinay arora
 

More from vinay arora (20)

Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)
 
6 java - loop
6  java - loop6  java - loop
6 java - loop
 
4 java - decision
4  java - decision4  java - decision
4 java - decision
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
 
2 java - operators
2  java - operators2  java - operators
2 java - operators
 
1 java - data type
1  java - data type1  java - data type
1 java - data type
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Uta005 lecture1
Uta005 lecture1Uta005 lecture1
Uta005 lecture1
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protection
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitives
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devices
 
A&D - UML
A&D - UMLA&D - UML
A&D - UML
 
A&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLA&D - Object Oriented Design using UML
A&D - Object Oriented Design using UML
 
C Prog - Array
C Prog - ArrayC Prog - Array
C Prog - Array
 

Recently uploaded

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 

C Prog. - Structures

  • 1. C Programming - Structures Organized By: Vinay Arora Assistant Professor, CSED Thapar University, Patiala
  • 2. Program - 1 #include<stdio.h> getch(); #include<conio.h> } void main() { char name[3]; float price[3],i; clrscr(); printf("Enter names, price of 3 booksn"); for(i=0;i<=2;i++) scanf("n%c %f",&name[i],&price[i]); printf("nAnd this is what you have enteredn"); for(i=0;i<=2;i++) printf("%c %fn",name[i],price[i]); Vinay Arora CSED
  • 3. Program – 1 (output) Vinay Arora CSED
  • 4. Program - 2 #include<stdio.h> printf("nAnd this is what you have enteredn"); #include<conio.h> printf("n%c %f",b1.name,b1.price); void main() printf("n%c %f",b2.name,b2.price); { printf("n%c %f",b3.name,b3.price); struct book { getch(); char name; } float price; }; struct book b1,b2,b3; clrscr(); printf("Enter names, price of 3 booksn"); scanf("n%c %f",&b1.name,&b1.price); scanf("n%c %f",&b2.name,&b2.price); scanf("n%c %f",&b3.name,&b3.price); Vinay Arora CSED
  • 5. Program – 2 (output) Vinay Arora CSED
  • 6. Thnx… Vinay Arora CSED