Class 12 Computer Science Chapter 9 Notes

Important Notes of complete Class 12 Computer Science Chapter 9 Notes written by Professor Mr. Faraz Qasir Suib. These notes are very helpful in the preparation of Class 12 Computer Science Chapter 9 Notes of for the students of the intermediate 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:
  • Describe The Basic Elements (Building Blocks) of C Language: Answer : The Basic Elements (Building Blocks) of C Language : Computer does not do anything on its own. The most important skill to learn is how intelligently one can program it. It can be used to solve multidimensional problems. The C being a magic tool for writing programs is used to solve variety of problems; a beginner just need practice and more practice of writing programs to master it. The proper use of basic elements (building blocks) of C language helps a lot to write effective C programs. Identifiers : These are the names used to represent variables, constants, types, functions, and labels in the program. Identifiers in C can contain any number of characters, but only the first 31 are significant to C compiler. There are two types of identifiers in C :
  • Describe Keywords.
  • Describe Variables.
  • How do you declare Variables in C.
  • Differentiate between Declaring vs Defining a Variable in C: Answer : Declaring vs Defining a Variable : Variable declaration tells the compiler the name of the variable to be used in the program and the type of information stored in it. In a C program, the : int volume ; char ch ; variable declarations tell the compiler the name of two variables (volume and ch) used to store an integer and character data respectively. Important Note 1 : A variable declaration does not set aside memory location for the data to be stored. It just informs the compiler the name of the variable and the type of data to be stored in it, while the definition of the variable that set aside memory location for the variable. Important Note 2 : However in C, the variable declaration statement not only declares the variable but also defines it as in case of above two statements. It does not mean that the declaration of a variable can not be separated from its definition in C.
  • Describe Initializing a Variable.
  • Describe Rules for Naming Variables in C.
  • Explain, Why Variable Names should be Readable.
  • Explain, Constants in C Language.
  • Explain, Data Types in C Language.
  • Explain, Data Types in C Language.
  • Define and Explain Expression.
  • Explain importance, usage and style of Comments in C: Answer : Comments : Comments are used to increase the readability of the program. With comments, informative notes are inserted in the program’s code, which help in debugging and modifying the program. In C, there are two ways to comment the code. Single-Line Comments : One can insert single line comments by typing two (forward) slashes (//)at the start of the note : // This program calculates the factorial of the given number Multi-Line Comments : Multi-line comments are used to add such informative notes which extend to multiple lines. Multi-line comments can be inserted to the code (program code) by placing (/*) characters at the beginning of the comments 53 (informative note), this is called opening of the multi-line comments. Each multi-line comment must end with letters (*/) Omitting ending letters (*/) will cause the whole program code beneath the opening letters (/*) for comments to be commented. 

Loading your document...