Mr Alex Jose, PGT (Computer Science)
Date of submission: 23 June 2014
1.Write 10 examples for invalid identifiers and state why they are invalid.
2. Write and evaluate 10 expressions in C++.(Expressions must contain arithmetic, logical, relational and increment/decrement operators)
3. Write for loop and equivalent while loop for any 10 programming situations.
4. Write 2 programs with switch and equivalent programs with if else if… else if.
5. Write program(s) to input integer array and
(i) To find the minimum, maximum, sum and average of elements in the array.
(ii) To search for a particular element in the array.
6. Write program(s) to input a string and
(i) Reverse the string and check if it is a palindrome or not.
(ii) Convert all upper case letters to lower case and vice versa.
(iii) To print the statistics of characters.(upper, lower, digits, other characters)
(iv) To search for a substring in the given string.
7. Solve 2 output questions using random function.
8. Using a structure Time( with hour, min and secs as members)
(i)Write a function that takes two Time type parameters and return their sum.
(ii)Write a function that takes two Time type parameters and return the larger time.