Begin the session by explaining the objectives of the session.
Use this slide to test the student’s understanding on one-dimensional arrays.
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.
Use this slide to test the student’s understanding on one-dimensional arrays.
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.
Use this slide to test the student’s understanding on referencing the array elements.
Use this slide to test the student’s understanding on referencing the array elements.
Use this slide to test the student’s understanding on array addressing.
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.
Use this slide to test the student’s understanding on 2-D arrays.
Use this slide to test the student’s understanding on 2-D arrays.
Use this slide to test the student’s understanding on 2-D array.
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.
Use this and the next 3 slides to summarize the session.