Professional Documents
Culture Documents
Test Lebanon Oop
Test Lebanon Oop
10 T 60 if ( x 12) if ( x 12)
4 /12/ 2012
(b) Give a definition for : (i) a Compiler, (ii) Linker ? 2# (a) Differentiate between the Variable and a Pointer, with appropriate example? (b) What is the output from the following program?
#include <iostream> using namespace std; int Fn(int a, int b) { return a+ b + 100 ; } int main() { int x1 =3 , x2 = 50 , x3 ; x3 = Fn( x1, x2); cout << The sum is = << x3 ; return 0 ; }
3# (a) Write a program to find the sum of the ODD number between 7 and 45 ? (b) (i) What is the binary value 00110101 as a decimal? (ii) What is the binary value of the decimal 35 ? 4# (a) Write a function to sort an Array in ascending order? (b) Find errors, if any, in the following C++ statements. (i) cout << x = x; (ii) float R = 20.5 ; (iii) cin >> x ; >> y ; (iv) #including < iostream > (v) int * * R ; 5# (a) Write a program to display the following output;
1 12 123 1234
(b) Find the Invalid identifiers? (i) Sum123 (ii) 2xy (vi) x@y (vii) Average_equal_39