CBSE eBooks CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK
Chapter – 1 C++ Revision Tour 1.e. Write the output of the following program: 3 #include<iostream.h> Ans: Output: 2023 1. f. Write a function seqsum( ) in C++ with two arguments, double x and int n. The function should return a value of type double and it should find the sum of the following series. 4 Ans: 1+ x/2! + x /4! + x /6! + x /8! + x /10! + ----------+ x /(2n)! #include<iostream.h> for(int j=1;j<=2*i;j++) } 1999 Annual Paper: 1.a. Why main( ) function is so special. Give two reasons? 1 Ans: Execution of the program starts and ends at main( ). The main( ) is the driver function of the program. If it is not present in a program, no execution can take place. 1.b. Name the header file of C++ to which following functions belong.
Ans:
1.c. Find the syntax error(s), if any, in the following program: #include<iostream.h> Ans: (i) Line No 5: Undefined symbol ‘i’. The variable ‘i’ is not declared in the program. Ans: Output: First =8second =2 |