Class 10 Computer Chapter 4 Notes

Complete Class 10 Computer Chapter 4 Notes Data and Repetition in 10th Class Computer Science English and Urdu Medium. These computerized notes are very helpful in the preparation of Class 10 Computer Chapter 4 Notes for students of the 10th class Computer Science and these are according to the paper patterns of all Punjab boards.

Summary and Contents:
Topics which are discussed in the notes are given below:
  • Important 10 class computer chapter 4 mcqs for all students of Punjab  Textbook Board.
  • An array is a ...... structure.  (A) Loop  (B) Control  (C) Data  (D) Conditional
  • Array elements are stored at ...... memory locations.  (A) Contiguous  (B) Scattered  (C) Divided  (D) None
  • If the size of an array is 100, the range of indexes will be:  (A) 0-99  (B) 0-100  (C) 1-100  (D) 2-102
  • Important class 10 computer chapter 4 notes pdf for all students of Punjab  Textbook Board.
  • ........ structure allows repetition of a set of instructions.  (A) Loop  (B) Control  (C) Data  (D) Conditional
  • ....... is the unique identifier, used to refer to the array.  (A) Data Type  (B) Array name  (C) Array size  (D) None
  • Important class 10 computer chapter 4 exercise solutions for all students of Punjab  Textbook Board.
  • Array can be initialized ...... declaration.  (A) At the time of  (B) After  (C) Before  (D) Both a & b
  • Using loops inside loops is called loops.  (A) For  (B) While  (C) Do-while  (D) Nested
  • ...... part of for loop is executed first.  (A) Condition  (B) Body  (C) Initialization  (D)Increment/Decremnt
  • Important class 10 computer chapter 4 question answer for all students of Punjab  Textbook Board.
  • ...... make it easier to read and write values in array.  (A) Loops  (B) Conditions  (C) Expressions  (D) Functions
  • To initialize the array in a single statement, initialize it declaration.  (A) At the time of  (B) After  (C) Before  (D) Both a & b
  • Important class 10 computer chapter 4 programming exercise for all students of Punjab  Textbook Board.
  • Accessing array elements: Each element of an array has an index that can be used with the array name as array_name[index] to access the data stored at that particular index. First element has the index 0, second element has the index 1 and so on. Thus height[0] refers to the first element of array height, height[1] refers to the second element and so on. Graphical representation of array height initialized in the last section.
  • Important class 10 computer notes chapter 4 for all students of Punjab  Textbook Board.
  • Using variables as array indexes: A very important feature of arrays is that we can use variables as array indices e.g. look at the following program: 
  • Important class 10 computer chapter 4 exercise for all students of Punjab  Textbook Board.
  • EXAMPLE CODE: #include  ,  void main()  ,  {  int array[5] = {10, 20, 30, 40, 50);  ,  int i;   ,   /* Following statements ask the user to input an index into variable i. */   , printf("Please enter the index whose value you want to display");  ,  scanf("%d", &i);   , /* Following statement displays the value of the array at the index entered by user. */  , printf("The value is %d", array[i]);    }
  • Important class 10 computer chapter 4 important questions for all students of Punjab  Textbook Board.
  • Loop Structure: If we need to repeat one or more statements, then we use loops. For example, if we need to write Pakistan thousand times on the screen, then instead of writing printf("Pakistan"); a thousand times, we use loops. C language provides three kind of loop structures:
  • Important class 10 computer chapter 4 short question answer for all students of Punjab  Textbook Board.
  • 1- Forloop,  2- While loop,  3- Do While loop. In this chapter, our focus is on for loops.
  • General structure of loops: If we closely observe the process that humans follow for repeating a task for specific number of times then it becomes easier for us to understand the loop structures that C language provides us for controlling the repetitions.
  • Important class 10 computer chapter 4 pdf solutions for all students of Punjab  Textbook Board.
  • Let's assume that our sports instructor asks us to take 10 rounds of the running track. How do we perform this task? First we set a counter to zero, because we have not yet taken a single round of the track. Then we start taking the rounds. After each round we increase our counter by 1 and check whether we have completed 10 rounds or not yet. 
  • Important class 10 computer chapter 4 exercise solutions pdf for all students of Punjab  Textbook Board.
  • If we have not yet completed the 10 rounds then we again take a round, increase our counter by 1, and again check whether we have taken 10 rounds or not. We repeat this process till our counter reaches 10.
  • Different programming languages follow similar philosophy in the loop structures for repeating a set of instructions.
  • Important class 10 computer chapter 4 extra questions for all students of Punjab  Textbook Board.

Loading your document...