Tuesday, September 22, 2009

CLASS XI, COMPUTER SCIENCE(C++)

CLASS XI(C++): Flow of Control and Standard Library Functions

Click here to download the Assignment



CLASS XI(C++): Output Based Questions

Click here to download the Assignment

Monday, December 22, 2008

CLASS XI-C++, FUNCTIONS ASSIGNMENT

Q1. Wap in c++ using user defined function calc( ) which accepts an integer as its parameter.
- it first checks whetehr the number is positive or negative. If it is negative it converts it into positive using library function .
- then the function will calculate the sum of square of digits of the number passed.
Q2. Wap in c++ using udf to pass n (total number of terms) as a parameter to function series ( ) which generates and print the following series upto n terms
22 + 42 + 62 + 82 + -----
Q3. Wap in c++ using udf to pass 1-d array, its size and an integer as a parameter and find
- whether the number is present in the array or not and display appropraite messages.
- if the number is present then find its frequency and print it.
Q4. Wap in c++ using udf to pass 1-d array, its size and an integer as a parameter and find
- whether the number is present in the array or not and display appropraite messages.
- if the number is present then find its frequency and print it.
Q5. Wap in c++ using udf to pass 1-d array, its size and an integer as a parameter and find
- whether the number is present in the array or not and display appropraite messages.
- if the number is present then find its frequency and print it.
Q6.wap in c++ using udf to pass two arguments x and n to function series ( ) which prints the following series and returns its sum upto n terms:
1+x/2+x2/3+x3/4------------------------------+xn/n+1
Q7. Write a c++ function that intakes two arguments: a character and an integer and prints the character given number of times.
Q8. wap in c++ using udf to pass two arguments x and n to function series ( ) which prints the following series and returns its sum upto n terms:
1+x/2!+x2/3!+x3/4!------------------------------+xn/(n+1)!
Q9. Write a C++ program that uses a function smallo() (that is passed two int argument by reference) to receive reference of the smaller value. Then using this reference the smaller value is set to 0.
Q10. WAP that uses a function power() to raise a number m to power n. The function takes int values for m and n and returns the result correctly. Use a default value of 2 for n to make the function calculate squares when this argument is omitted. Write a main() to get the value of m and n from the user and to display the calculated result.

Sunday, December 21, 2008

CLASS XI-C++, ARRAYS ASSIGNMENT

Q1. WAP to count the number of words in a string as well as the number of characters other than a space. Also replace every space with a ‘#’.
Q2. WAP to check whether or not two arrays(of characters) are identical. If identical, count the total no. of vowels in it.
Q3. WAP IN C++ TO ACCEPT A 2D ARRAY NUM[3][3] .
And DISPLAY THE SUM OF EVEN NUMBERS.
- SET THE EVEN NUMBERS TO ZERO AND DISPLAY THE RESULTANT ARRAY.
Q4. WAP to find the sum of squares of elements on the diagonal of a square matrix nXn. Replace the diagonal elements with a ‘0’.
Q5. WAP to count number of occurrences of a given character in a string.
Q6. wAP to accept a 2-D array num[3][4] and display the sum of even numbers in the array.
Q7. WAP to accept a string and a character from the user. Check whether the string contains the character or not. If the string contains the character, display the no. of times the character appears. Also display whether the character is in uppercase or lowercase.
(Use standard library functions).
Q8.FROM A 2-D ARRAY A[4][4] WAP IN C++ TO PREPARE A 1-D ARRAY B[16] THAT WILL HAVE ALL THE ELELEMENTS OF ARRAY IF THEY ARE STORED IN ROW MAJOR FORM AS FOLLOWS
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

THE RESULTANT ARRAY SHOULD BE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Q9.WAP IN C++ TO INPUT AN ARRAY OF N INTEGERS AND FIND THE SUM OF ELEMENTS PRESENT AT ODD NUMBERED POSITION IN THE ARRAY..
Q10.WAP IN C++ TO INPUT AN ARRAY OF N INTEGERS AND FIND THE PRODUCT OF ELEMENTS PRESENT AT EVEN NUMBERED POSITION IN THE ARRAY
Q11.WAP IN C++ TO INPUT AN ARRAY OF INTEGERS AND FIND THE SUM OF NUMBERS IN 1-D ARRAY WHICH ARE DIVISIBLE BY 7.

CLASS XI - C++, Flow of Control Assignment

Q.1 wap in c++ to input a +ve number and count the number of even and odd number digits in it.
Q.2 wap in c++ to declare an integer and use it to find the product of ten numbers inputted by the user using loops.
Q.3 wap in c++ to print the table of 2 to 6 upto 10 using while loop.
Q.4 wap in c++ to input a +ve number and count the number of digits in it.
Q.5 wap in c++ to declare an integer and use it to find the sum and the average
of ten numbers inputted by the user using loops.
Q.6 wap in c++ to find sum of prime numbers between 1 to 50.
Q.7 wap in c++ to find and display the roots of quardatic equation . Display
appropraite message.
Q.8 wap in c++ to find the muliples of 7 from 1 to 50.
Q.9 wap in c++ to input a number and count the even and odd digits in it.
Q.10 Wap to declare a character and keep on displaying the inputted characters till the user inputs 'Q'.