Posts

CS-PRACTICALS LIST -1- FOR XIB

List of Programs for Practical : 2012-13 Subject: Computer Science (083) Class: XI   1. Write a program to find the value of “m” to the power “n”. 2. Write a program to print the mathematical table of number 1 to 10. 3. Write a program to find the factorial value of a number entered by the user. 4. Write a program to check whether the number is prime or not. 5. Write a program to find the sum of first “n “natural numbers. 6. Write a program to find the minimum and maximum value from an array of size 10. 7. Write a program to print the given figure (make a general prog. for any no. of rows) * * * * * * * * * * * * * * * 8. Write a program to print the following pattern: 1 2 2 3 3 3 4 4 4 4   9. Write a program to print the following pattern:             1            2     2   ...

Second Monthly Test Question Paper -xiiB-CS

KENDRIYA VIDYALAYA NO. 1 , NAUSENABAUGH, VISAKHAPATNAM-05 Second Monthly Test   Question Paper   Subject : Computer Science Class :   XII        Section : B        Duration: 90 Min.             Max Marks :50 Wat is Inheritance ? Define the needs and objectives of Inheritance.                               (1M) What is the use and syntax/prototype   of seekg(), seekp(),tellg(),tellp() functions.   (1M) Define and Give an example of nested class                                            ...

XII-B-CS (A NOTE ON--POINTER)--PART 2

new operator Syntax: pointer variable = new data_type; Example: char *cptr; cptr = new char; char *captr; captr = new char[10]; delete operator Syntax: delete pointer variable ; Example: delete cptr; delete [] captr; C++ has the concept of constant pointer and pointer to a constant. For example: char * const cptr1="Computer Science"; //constant pointer Here the address of cptr1 cannot be modified. int const *iptr=&x; // pointer to a constant const char * const cptr2="KV"; // pointer to a constant Here the constant value, to which the pointer pointing to, can not be modified. A NULL pointer is a pointer which indicates that it is not pointing to any valid memory address. For example: int *iptr=NULL; Pointer Arithmetic: Only addition and subtraction may be performed on pointers. All the pointers increases and decreases by the length of the data type they point to. Adding 1 to a pointer adds the size of ...

XII-B-CS (A NOTE ON--POINTER)--PART 1

Pointers <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Syllabus: Declaration and Initialization of Pointers; Dynamic memory allocation/deallocation operators: new, delete; Pointers and Arrays: Array of Pointers, Pointer to an array (1 dimensional array), Function returning a pointer, Reference variables and use of alias; Function call by reference. Pointer to structures:Deference operator: *, ->; self referencial structures; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...

XII-B-CS (A NOTE ON --DATA FILE HANDLING)

Image
Data File Handling Using stream I/O classes : So far we have performed input or output of information in our programs by using  cin and cout . These are used to handle console based I/O  ( cin-- console based input stream object   ,  cout - console based outp ut stream object )   cin allowed us to read data from an input stream that connects the keyboard to our programs. In a similar manner, cout allowed us to write information to an output stream that connects our program to the monitor screen. C++ implements these file input and output streams using the subclasses ifstream and ofstream , respectively, where the subclass ifstream is derived from the istream class and the subclass ofstream is derived from the ostream class. The ifstream and ofstream classes inherit all the stream operations of the istream and ostream classes , but they also have their own member functions such as open() and close() and control their relationship to ...