10th Class Computer Chapter 2 Urdu Medium

Important full 10th Class Computer Chapter 2 Urdu Medium of User Interaction 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 2 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. 2: User Interaction in Computer Science class 10th Urdu Medium.
  • Important Short Questions with Correct Answers of Chapter No. 2: User Interaction in Computer Science class 10th Urdu Medium.
  • Use the assignment operator
  • Define relational operators
  • Use the following relational operators: 1. Less than (<)  2. Greater than (>)  3. Less than or equal to (<=)  4. Greater than or equal to (> =)  5. Equal to (==)  6. Not Equal to (!=)
  • Define a logical operator
  • Use the following logical operators: 1. AND (&&)  2. OR (||)  3. NOT (!)
  • Differentiate between the assignment operator (=) and equal to operator (==)
  • Differentiate between the unary and binary operators
  • Define and explain the order of precedence of operators
  • Unit Introduction: A computer is a device that takes. data as input, processes that data and generates the output. Thus all the programming languages must provide instructions to handle input, output and processing of data. In this chapter, we discuss different pre-built input/output functions available in C language. We also discuss different operators that we can apply to process the data.
  • Input/output functions: We need a way to provide input and show output while writing programs. Each programming language has its keywords or standard library functions for I/O operations. C language offers printf function to display the output, and scanf function to get input from user. In the following section, we discuss these two functions.
  • printf(): printf is a built-in function in C programming language to show output on screen. Its name comes from "print formatted" that is used to print the formatted output on screen. All data types discussed in the previous chapter can be displayed with printf function. To understand the working of printf function, let's look at the following example program:
  • EXAMPLE CODE: #include void main () , {   printf("Hello World");      }   Output:   Hello World
  • In this example, printf function is used to display Hello World on screen. Whatever we write inside the double quotes" and " in the printf() function, gets displayed on screen.
  • Format Specifiers: What if we want to display the value of a variable? Let's declare a variable and. then check the behavior of printf. int age = 35;   Now I want to display the value of this variable age on screen. So, I write the following statement:  printf("age");   But, it does not serve the purpose, because it displays the following on screen.   age
  • It does not display the value stored inside the variable age, instead it just displays whatever was written inside the double quotes of printf. In fact, we need to specify the format of data that we want to display, using format specifiers. The format specifiers against different data types in C language.
  • scanf(): scanf is a built-in function in C language that takes input from user into the variables. We specify the expected input data type in scanf function with the help of format specifier. If user enters integer data type, format specifier mentioned in scanf must be %d or %i. Consider the following example: 
  • EXAMPLE CODE: #include , void main ()  ,  {   char grade;    scanf("%c", &grade);     }
  • In this example, %c format specifier is used to specify character type for the input variable. Input entered by user is saved in variable grade. There are two main parts of scanf function as it can be seen from the above code. First part inside the double quotes is the list of format specifiers and second part is the list of variables with & sign at their left.

Loading your document...