100% found this document useful (1 vote)
413 views

2nd Semester Paper BSCS Java

1. The document is an exam paper for an Advance Object Oriented Programming course taken by a student at the University of Education Dera Ghazi Khan Campus. 2. The exam contains 3 questions - the first asks the student to encircle the correct answer for multiple choice questions, the second asks the student to answer short questions, and the third asks the student to write programs to solve two programming problems. 3. The questions cover topics related to Java programming including primitive data types, Java history, operators, loops, if/else statements, and writing simple programs.

Uploaded by

Faisal Izhar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
413 views

2nd Semester Paper BSCS Java

1. The document is an exam paper for an Advance Object Oriented Programming course taken by a student at the University of Education Dera Ghazi Khan Campus. 2. The exam contains 3 questions - the first asks the student to encircle the correct answer for multiple choice questions, the second asks the student to answer short questions, and the third asks the student to write programs to solve two programming problems. 3. The questions cover topics related to Java programming including primitive data types, Java history, operators, loops, if/else statements, and writing simple programs.

Uploaded by

Faisal Izhar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

UNIVERSITY OF EDUCATION DERA GHAZI KHAN CAMPUS

STUDENT NAME:------------------------------ ROLL NUMBER……………………


Paper Course: Advance Object Oriented Programming Exam: Midterm
Program: BSIT (Evening) Semester: 2nd
Session: 2018-2021 Total Marks: 20
Time Allowed: 1 hr. Dated: 24-04-2019
Q No. 1 Encircle the Correct one: 1x6=6
1. How many primitive types are there in java?
a}6 b)7 c)8 d)9
2. Java development was led by_____in 1991.
a)Lemay b) Perkins c) James Gosling d) All of these
` 3. Size of integer variable in java ___________bits?
A)16 b)32 c)64 d)8
4. In java _____ can only check for equality, where as ______ can evaluate
any type of Boolean expression.
a)if, switch b) switch, if c)if, brake d)if, continue

5. Which of the loop will be an infinite loop


a)for(; ;) b) for(i=0;i<1 ;i--) c) for(i=0; ;i++) d)All of above
6. Which of these operators can skip evaluating right hand operand?
a) ! b) | c) & d) &&
Q No. 2 Short Questions: 3x2=6
a) Differentiate between ‘IF’ and ‘Switch’ statement? Give Example also.
b) Define any Five Characteristics of Java.
c) Differentiate between Do While loop and While loop?
d) Write the output of the following program

class Relational_operator {
public static void main(String args[]) {
int var1 = 5,var2 = 6;
System.out.print(var1 > var2);
System.out.print(var1 > var2);
} }

Q No. 3 Short Questions: 4+4=8


i) Write a program to Find the Largest number between three numbers
using nested if Statement.
ii) Write a program for print the Table of any number. Number is Input by
user.

You might also like