CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By MRK CBSE CLASS XII 2003 Annual Paper: 1.a. What is the difference between global variables and local variables? Give an example to illustrate the same. Ans. The local variables are the variables defined within any function (or block) and are hence accessible only within the block in which they are declared. In contrast to local variables, variables declared outside of all the functions in a program are called global variables. These variables are defined outside of any function, so they are accessible to all functions. These functions perform various operations on the data. They are also known as External Variables. 1.b. Name the header file, to which the following built-in function belongs: Ans. (i) strcmp( ) - string.h 1.c. Rewrite the following program after removing all the syntax error(s) if any.2 #include<iostream.h> Ans. 1.e. Write the output of the following program: } Paper By Mr. MRK |