10th Class Computer Chapter 4 Urdu Medium

Important full 10th Class Computer Chapter 4 Urdu Medium of Data and Repetition in 10th Class Computer Science Urdu Medium written by Honorable Mr. Wajid Ghani Suib. These computerized notes are very helpful in the preparation of 10th Class Computer Chapter 4 Urdu Medium 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 Multiple Choice Questions (MCQs) with correct Answers of Chapter No.4: Data and Repetition in Computer Science class 10th Urdu Medium.
  • Important Short Questions with Correct Answers of Chapter No. 4: Data and Repetition in Computer Science class 10th Urdu Medium.
  • Students Learning Outcomes. After completing this unit students will be able to
  • Understand the structure of array
  • Declare and use one dimensional arrays
  • Use variable as an index in array
  • Read and write values in array
  • Explain the concept of loop structure
  • Know that for loop structure is composed of:  1. For,  2. Initialization expression,  3. Test expression,  4. Body of the loop,  5. Increment/decrement expression
  • Explain the concept of a nested loop
  • Use loops to read and write data in array
  • Unit IntroductionWhile writing computer programs, we may find situations where we need to process large quantities of data. The techniques that we have learnt so far may not seem suitable in these situations. So we need to have better mechanisms for storage and processing of large amounts of data. Another common problem that we face is how to repeat a set of instructions for multiple times without writing them again and again. This chapter discusses the ways that C programming language provides in order to deal with data and repetitions.
  • Data StructuresIn the previous chapters, we learnt how to store pieces of data in the variables. What if we need to store and process large amount of data e.g. the marks of 100 students? Probably, we need to declare 100 variables, which does not seem an appropriate solution. So, high level programming languages provide data : structures in order to store and organize data. A data structure can be defined as follows:
  • Data structure is a container to store collection of data items in a specific layout.
  • Different data structures are available in C programming language, however this chapter discusses only one of them, which is called Array. It is one of the most commonly used data structures.
  • Array: An array is a data structure that can hold multiple values of same data type e.g. an int array can hold multiple integer values, a float array can hold multiple real values and so on. An important property of array is that it stores all the values at consecutive locations inside the computer memory.
  • Array Declaration: In C language, an array can be declared as follows: data_type array_name[array_size];    (type of data to be stored in array - data_type) , (maximum number of elements that can be stored - array_size) , (identifier of array - array_name)
  • If we want to declare an array of type int that holds the daily wages of a laborer for seven days, then we can declare it as follows:  int daily_wage [7];  , Following is the example of the declaration of a float type array that holds marks of 20 students.  float marks [20];
  • Array Initialization: Assigning values to an array for the first time, is called array initialization. An array can be initialized at the time of its declaration, or later. Array initialization at the time of declaration can be done in the following manner.
  • data_type array_name[N] = {value1, value2, value3,........, valueN};
  • Following example demonstrates the declaration and initialization of a float array to store the heights of seven persons.
  • float height [7] = (5.7, 6.2, 5.9, 6.1, 5.0, 5.5, 6.2);
  • Here is another example that initializes an array of characters to store five vowels of English language.
  • char vowels [5] = {'a', 'e', 'i', 'o', 'u'};

Loading your document...