Date of submission: 5 June 2015
1) What are tokens? Explain the types of tokens in C++.
2) Give 10 examples for invalid identifiers with reason.
3) Explain the various types of literals available in C++ with examples.
4) Explain the various types of operators in C++ with examples.
5) Explain the fundamental data types in C++ with the combination of modifiers.
6) Explain the Derived data types in C++.
7) Explain the selection statements in C++ with examples
8) Write 10 for loops and the equivalent while loops for various programming situations
9) Write a program to input an integer array and to :
i) Print the largest number of the array
ii) Print the smallest number of the array
iii) Print the sum of numbers of the array
iv) Print the average of numbers of the array
10) Write a program to enter a square matrix and
i) Print the sum of elements on the right diagonal
ii) Print the sum of elements below the right diagonal
iii) Print the sum of elements above the right diagonal
iv) Print the sum of elements on the left diagonal
v) Print the sum of elements below the left diagonal
vi) Print the sum of elements above the left diagonal
vii) Print the upper and lower triangle
11) Write a program to input a string and do the following without any language supported functions
i) Find the length of the string
ii) Print the reverse
iii) Concatenate it with another string
iv) Compare it with another string.
12) Write a program to create an array of structure student, and input and display the details of ‘n’ students. Store DOB of the student as a nested structure.