Professional Documents
Culture Documents
Midterm Paper 1st Semester
Midterm Paper 1st Semester
Email: abbaskhalid.ciit@gmail.com
________________________________________________________________________________
Q.1: Identify the valid and invalid Statements for the given code, also write the values for valid
statement.
Int a,b,c;
a=6,
b=7
c=8;
Q.3: Find the errors in the following statement if there are and correct them.
j) float average=90.15.
Q.4: Find out the valid and invalid for a variable name if invalid give the reasons.
a) income b) total marks c) double d) average-score
i) 2ndTry j) $cost
Q.5: For the following describes questions, assume the following declarations.
Int i=1;
Int j=2;
Int k=3;
double x=1.0;
double y=2.0;
double z=3.0;
I. i+j==k;
II. k-i<y>x;
III. z-x+1 !=j+k-2*I;