SlideShare a Scribd company logo
1 of 31
[object Object],[object Object],[object Object],Objectives
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Working with Arrays
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],One-Dimensional Arrays
[object Object],[object Object],[object Object],[object Object],Practice: 3.1
[object Object],[object Object],[object Object],[object Object],Practice: 3.1 (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],One-Dimensional Arrays (Contd.)
[object Object],[object Object],Practice: 3.2
[object Object],Practice: 3.2 (Contd.)
[object Object],[object Object],[object Object],One-Dimensional Arrays (Contd.)
[object Object],[object Object],Practice: 3.3
[object Object],Practice: 3.3 (Contd.)
[object Object],Practice: 3.4
[object Object],Practice: 3.4 (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],One-Dimensional Arrays (Contd.)
[object Object],Practice: 3.5
[object Object],Practice: 3.5 (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Multidimensional Arrays
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Practice: 3.6
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Practice: 3.6 (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Multidimensional Arrays (Contd.)
[object Object],[object Object],[object Object],[object Object],Practice: 3.7
[object Object],[object Object],[object Object],[object Object],Practice: 3.7 (Contd.)
[object Object],[object Object],[object Object],[object Object],Practice: 3.8
[object Object],[object Object],[object Object],Practice: 3.8 (Contd.) OPTION ACTION a. Display each student's name along with his average marks. b. Display each subject along with class average on the subject. c. Display list of students and list of subjects. Allow the user to choose one from each. Based on the numbers chosen, display the appropriate marks. Remember, subscripting in C starts from zero. d. Check the average of each student. Wherever average exceeds 80, display the student name and the subject name and marks in each subject.
[object Object],Practice: 3.8 (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Appreciating Preprocessor Directives
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Appreciating Preprocessor Directives (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Summary
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Summary (Contd.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Summary (Contd.)
[object Object],[object Object],[object Object],Summary (Contd.)

More Related Content

What's hot

C programming session 05
C programming session 05C programming session 05
C programming session 05
Vivek Singh
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
Pranoti Doke
 
12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp
sharvivek
 

What's hot (20)

Data type in c
Data type in cData type in c
Data type in c
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Strings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiStrings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothi
 
Computer programming(CP)
Computer programming(CP)Computer programming(CP)
Computer programming(CP)
 
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSTRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
 
C programming & data structure [character strings & string functions]
C programming & data structure   [character strings & string functions]C programming & data structure   [character strings & string functions]
C programming & data structure [character strings & string functions]
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
 
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
MANAGING INPUT AND OUTPUT OPERATIONS IN C    MRS.SOWMYA JYOTHI.pdfMANAGING INPUT AND OUTPUT OPERATIONS IN C    MRS.SOWMYA JYOTHI.pdf
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
 
Pointers-Computer programming
Pointers-Computer programmingPointers-Computer programming
Pointers-Computer programming
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
 
Structures-2
Structures-2Structures-2
Structures-2
 
Computer
ComputerComputer
Computer
 
Tutorial on c language programming
Tutorial on c language programmingTutorial on c language programming
Tutorial on c language programming
 
Theory1&2
Theory1&2Theory1&2
Theory1&2
 
C++
C++C++
C++
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
 
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSCBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
 
C language basics
C language basicsC language basics
C language basics
 
12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp
 
Assignment c programming
Assignment c programmingAssignment c programming
Assignment c programming
 

Viewers also liked (14)

C programming session 03
C programming session 03C programming session 03
C programming session 03
 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
 
Dacj 1-2 c
Dacj 1-2 cDacj 1-2 c
Dacj 1-2 c
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
 
Session no 4
Session no 4Session no 4
Session no 4
 
Session no 2
Session no 2Session no 2
Session no 2
 
Java script session 3
Java script session 3Java script session 3
Java script session 3
 
C programming session 07
C programming session 07C programming session 07
C programming session 07
 
Session No1
Session No1 Session No1
Session No1
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
Niit
NiitNiit
Niit
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Session 3 Java Script
Session 3 Java ScriptSession 3 Java Script
Session 3 Java Script
 

Similar to C programming session 04

C UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDYC UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDY
Rajeshkumar Reddy
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
AjayBahoriya
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
aroraopticals15
 
02 c++ Array Pointer
02 c++ Array Pointer02 c++ Array Pointer
02 c++ Array Pointer
Tareq Hasan
 
Lec 25 - arrays-strings
Lec 25 - arrays-stringsLec 25 - arrays-strings
Lec 25 - arrays-strings
Princess Sam
 

Similar to C programming session 04 (20)

Arrays
ArraysArrays
Arrays
 
arrays.docx
arrays.docxarrays.docx
arrays.docx
 
Unitii classnotes
Unitii classnotesUnitii classnotes
Unitii classnotes
 
C UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDYC UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDY
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Arrays
ArraysArrays
Arrays
 
Shanks
ShanksShanks
Shanks
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
 
02 c++ Array Pointer
02 c++ Array Pointer02 c++ Array Pointer
02 c++ Array Pointer
 
Lecture_01.2.pptx
Lecture_01.2.pptxLecture_01.2.pptx
Lecture_01.2.pptx
 
10 array
10 array10 array
10 array
 
Unit 2
Unit 2Unit 2
Unit 2
 
Array
ArrayArray
Array
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
3.ArraysandPointers.pptx
3.ArraysandPointers.pptx3.ArraysandPointers.pptx
3.ArraysandPointers.pptx
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
6.array
6.array6.array
6.array
 
Lec 25 - arrays-strings
Lec 25 - arrays-stringsLec 25 - arrays-strings
Lec 25 - arrays-strings
 
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
 
Arrays
ArraysArrays
Arrays
 

More from Dushmanta Nath (6)

Global Warming Project
Global Warming ProjectGlobal Warming Project
Global Warming Project
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Manufacturing Practice (MP) Training Project
Manufacturing Practice (MP) Training ProjectManufacturing Practice (MP) Training Project
Manufacturing Practice (MP) Training Project
 
BSNL Training Project
BSNL Training ProjectBSNL Training Project
BSNL Training Project
 
IT- 328 Web Administration (Practicals)
IT- 328 Web Administration (Practicals)IT- 328 Web Administration (Practicals)
IT- 328 Web Administration (Practicals)
 
IT-314 MIS (Practicals)
IT-314 MIS (Practicals)IT-314 MIS (Practicals)
IT-314 MIS (Practicals)
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

C programming session 04

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.

Editor's Notes

  1. Begin the session by explaining the objectives of the session.
  2. Use this slide to test the student’s understanding on one-dimensional arrays.
  3. Tell the students that if the array is initialized at the time of declaration, then the dimension of the array need not to be given.
  4. Use this slide to test the student’s understanding on one-dimensional arrays.
  5. Explain bound checking and also tell the students that in C language, there is no bound checking for the arrays. The programmer has to take care of the array bounds. Also, discuss the hazards if the array bound is not taken care of in a program.
  6. Use this slide to test the student’s understanding on referencing the array elements.
  7. Use this slide to test the student’s understanding on referencing the array elements.
  8. Use this slide to test the student’s understanding on array addressing.
  9. Tell the students that there can be n-dimensional arrays. Multidimensional arrays can also termed as array of arrays. Explain the concept of array of arrays by taking an example of a 2-d array, which can be viewed as an array of one-dimensional arrays.
  10. Use this slide to test the student’s understanding on 2-D arrays.
  11. Use this slide to test the student’s understanding on 2-D arrays.
  12. Use this slide to test the student’s understanding on 2-D array.
  13. Only after the necessary files have been logically included and the # defined tokens are replaced with their values, the actual compilation process starts. When we enclose the file to be included within <> as in: #include <stdio.h> the preprocessor looks for the file in the directory /usr/include. If file does not exist there, an error is reported. If we include the file name within quotes instead, as in: #include “globe.h” the preprocessor looks for the file in the current directory. If the file does not exist there , it looks for it in the directory /usr/include . If it does not exist there either , an error is reported.
  14. Use this and the next 3 slides to summarize the session.